mirror of
				https://github.com/therootcompany/greenlock-express.js.git
				synced 2024-11-16 17:28:59 +00:00 
			
		
		
		
	example server: re-allow non-api prefixed apis
This commit is contained in:
		
							parent
							
								
									8f369226cf
								
							
						
					
					
						commit
						f539de2611
					
				| @ -39,6 +39,7 @@ var glx = require("./").create({ | |||||||
| 	approveDomains: myApproveDomains, // Greenlock's wraps around tls.SNICallback. Check the
 | 	approveDomains: myApproveDomains, // Greenlock's wraps around tls.SNICallback. Check the
 | ||||||
| 	// domain name here and reject invalid ones
 | 	// domain name here and reject invalid ones
 | ||||||
| 
 | 
 | ||||||
|  | 	servername: config.servername, | ||||||
| 	app: myVhostApp, // Any node-style http app (i.e. express, koa, hapi, rill)
 | 	app: myVhostApp, // Any node-style http app (i.e. express, koa, hapi, rill)
 | ||||||
| 
 | 
 | ||||||
| 	/* CHANGE TO A VALID EMAIL */ | 	/* CHANGE TO A VALID EMAIL */ | ||||||
| @ -93,7 +94,10 @@ function myApproveDomains(opts) { | |||||||
| 		}) | 		}) | ||||||
| 		.then(function() { | 		.then(function() { | ||||||
| 			// check for api prefix
 | 			// check for api prefix
 | ||||||
| 			var apiname = "api." + bare; | 			var apiname = bare; | ||||||
|  | 			if (domains.length) { | ||||||
|  | 				apiname = "api." + bare; | ||||||
|  | 			} | ||||||
| 			return checkApi(apiname) | 			return checkApi(apiname) | ||||||
| 				.then(function(app) { | 				.then(function(app) { | ||||||
| 					if (!app) { | 					if (!app) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user