fix proxying bug
This commit is contained in:
		
							父節點
							
								
									669c69e5eb
								
							
						
					
					
						當前提交
						ba8cb66c4f
					
				@ -324,6 +324,13 @@ module.exports.create = function (securePort, certsPath, vhostsdir) {
 | 
			
		||||
    function addSniWorkaroundCallback() {
 | 
			
		||||
      //SNICallback is passed the domain name, see NodeJS docs on TLS
 | 
			
		||||
      secureOpts.SNICallback = function (domainname, cb) {
 | 
			
		||||
        if (/(^|\.)_proxyable\./.test(domainname)) {
 | 
			
		||||
          // device-id-12345678._proxyable.myapp.mydomain.com => myapp.mydomain.com
 | 
			
		||||
          // _proxyable.myapp.mydomain.com => myapp.mydomain.com
 | 
			
		||||
          // TODO myapp.mydomain.com.proxyable.com => myapp.mydomain.com
 | 
			
		||||
          domainname = domainname.replace(/.*\.?_proxyable\./, '');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!secureContexts.dummy) {
 | 
			
		||||
          console.log('[log] Loading dummy certs');
 | 
			
		||||
          secureContexts.dummy = createSecureContext(localDummyCerts);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user