mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Preserve a query string when redirecting to and from login
This commit is contained in:
		| @@ -248,7 +248,9 @@ if (!disableCsrf) { | ||||
| // Host index page | ||||
| app.get('/', (request, response) => { | ||||
|     if (userModule.shouldRedirectToLogin(request)) { | ||||
|         return response.redirect('/login'); | ||||
|         const query = request.url.split('?')[1]; | ||||
|         const redirectUrl = query ? `/login?${query}` : '/login'; | ||||
|         return response.redirect(redirectUrl); | ||||
|     } | ||||
|  | ||||
|     return response.sendFile('index.html', { root: path.join(process.cwd(), 'public') }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user