mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2024-11-16 17:28:59 +00:00 
			
		
		
		
	Update README.md
This commit is contained in:
		
							parent
							
								
									c14077c099
								
							
						
					
					
						commit
						103e4ae419
					
				
							
								
								
									
										38
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								README.md
									
									
									
									
									
								
							| @ -115,26 +115,30 @@ var lex = require('letsencrypt-express').create({ | ||||
| //, store: require('le-store-certbot').create({}) | ||||
| //, sni: require('le-sni-auto').create({}) | ||||
| 
 | ||||
| , approveDomains: function (opts, certs, cb) { | ||||
|     // This is where you check your database and associated | ||||
|     // email addresses with domains and agreements and such | ||||
| 
 | ||||
| 
 | ||||
|     // The domains being approved for the first time are listed in opts.domains | ||||
|     // Certs being renewed are listed in certs.altnames | ||||
|     if (certs) { | ||||
|       opts.domains = certs.altnames; | ||||
|     } | ||||
|     else { | ||||
|       opts.email = 'john.doe@example.com'; | ||||
|       opts.agreeTos = true; | ||||
|     } | ||||
| 
 | ||||
|     cb(null, { options: opts, certs: certs }); | ||||
|   } | ||||
| , approveDomains: approveDomains | ||||
| }); | ||||
| ``` | ||||
| 
 | ||||
| ```javascript | ||||
| function approveDomains(opts, certs, cb) { | ||||
|   // This is where you check your database and associated | ||||
|   // email addresses with domains and agreements and such | ||||
| 
 | ||||
| 
 | ||||
|   // The domains being approved for the first time are listed in opts.domains | ||||
|   // Certs being renewed are listed in certs.altnames | ||||
|   if (certs) { | ||||
|     opts.domains = certs.altnames; | ||||
|   } | ||||
|   else { | ||||
|     opts.email = 'john.doe@example.com'; | ||||
|     opts.agreeTos = true; | ||||
|   } | ||||
| 
 | ||||
|   cb(null, { options: opts, certs: certs }); | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| 
 | ||||
| ```javascript | ||||
| // handles acme-challenge and redirects to https | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user