mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-28 21:25:25 +00:00
Preserve query variables when redirecting
This commit is contained in:
parent
5539519691
commit
90e8714e71
@ -189,7 +189,8 @@ export abstract class Server {
|
||||
}
|
||||
|
||||
protected withBase(request: http.IncomingMessage, path: string): string {
|
||||
return `${this.protocol}://${request.headers.host}${this.options.basePath}${path}`;
|
||||
const split = request.url ? request.url.split("?", 2) : [];
|
||||
return `${this.protocol}://${request.headers.host}${this.options.basePath}${path}${split.length === 2 ? `?${split[1]}` : ""}`;
|
||||
}
|
||||
|
||||
private onRequest = async (request: http.IncomingMessage, response: http.ServerResponse): Promise<void> => {
|
||||
|
Loading…
Reference in New Issue
Block a user