mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Update apprelays.js
if header is not null for websockets
This commit is contained in:
		
							parent
							
								
									5ba9d7e503
								
							
						
					
					
						commit
						0f85b186cc
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		
							
								
								
									
										14
									
								
								apprelays.js
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								apprelays.js
									
										
									
									
									
								
							|  | @ -638,12 +638,14 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) { | |||
|             } | ||||
|         } else { | ||||
|             // Tunnel is now in web socket pass-thru mode
 | ||||
|             if ((typeof header.connection == 'string') && (header.connection.toLowerCase() == 'upgrade')) { | ||||
|                 // Websocket upgrade succesful
 | ||||
|                 obj.socketParseState = 2; | ||||
|             } else { | ||||
|                 // Unable to upgrade to web socket
 | ||||
|                 obj.close(); | ||||
|             if (header != null) { | ||||
|                 if ((typeof header.connection == 'string') && (header.connection.toLowerCase() == 'upgrade')) { | ||||
|                     // Websocket upgrade succesful
 | ||||
|                     obj.socketParseState = 2; | ||||
|                 } else { | ||||
|                     // Unable to upgrade to web socket
 | ||||
|                     obj.close(); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue