mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Improved web relay sharing (#4413)
This commit is contained in:
		
							parent
							
								
									5d7fabfc21
								
							
						
					
					
						commit
						4fe394226c
					
				
					 3 changed files with 15 additions and 4 deletions
				
			
		|  | @ -224,6 +224,7 @@ module.exports.CreateWebRelayServer = function (parent, db, args, certificates, | |||
|                 if (req.session.userid) { delete req.session.userid; }  // Clear the web relay userid
 | ||||
|                 if (req.session.z != webSessionId) { req.session.z = webSessionId; } // Set the web relay guest session
 | ||||
|                 expire = urlCookie.expire; | ||||
|                 if ((expire != null) && (expire <= Date.now())) { parent.debug('webrelay', 'expired link'); res.sendStatus(404); return; } | ||||
|             } | ||||
| 
 | ||||
|             // No session identifier was setup, exit now
 | ||||
|  | @ -246,7 +247,7 @@ module.exports.CreateWebRelayServer = function (parent, db, args, certificates, | |||
|                 if (xrelaySession != null) { xrelaySession.close(); delete relaySessions[webSessionId]; } | ||||
| 
 | ||||
|                 // Create a web relay session
 | ||||
|                 const relaySession = require('./apprelays.js').CreateWebRelaySession(obj, db, req, args, domain, userid, nodeid, addr, port, appid, xrelaySession, expire); | ||||
|                 const relaySession = require('./apprelays.js').CreateWebRelaySession(obj, db, req, args, domain, userid, nodeid, addr, port, appid, webSessionId, expire); | ||||
|                 relaySession.onclose = function (sessionId) { | ||||
|                     // Remove the relay session
 | ||||
|                     delete relaySessions[sessionId]; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue