mirror of
https://github.com/coder/code-server.git
synced 2026-05-11 14:57:26 +02:00
Proxy path fixes (#4548)
* Fix issue where HTTP error status codes are not read. * Fix issues surrounding sessions when accessed from a proxy. - Updated vscode args to match latest upstream. - Fixed issues surrounding trailing slashes affecting base paths. - Updated cookie names to better match upstream's usage, debuggability. * Bump vendor. * Update tests. * Fix issue where tests lack cookie key. Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
@@ -24,7 +24,7 @@ export class CodeServerRouteWrapper {
|
||||
const isAuthenticated = await authenticated(req)
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return redirect(req, res, "login", {
|
||||
return redirect(req, res, "login/", {
|
||||
// req.baseUrl can be blank if already at the root.
|
||||
to: req.baseUrl && req.baseUrl !== "/" ? req.baseUrl : undefined,
|
||||
})
|
||||
@@ -88,9 +88,12 @@ export class CodeServerRouteWrapper {
|
||||
|
||||
try {
|
||||
this._codeServerMain = await createVSServer(null, {
|
||||
connectionToken: "0000",
|
||||
"connection-token": "0000",
|
||||
"accept-server-license-terms": true,
|
||||
...args,
|
||||
// For some reason VS Code takes the port as a string.
|
||||
/** Type casting. */
|
||||
help: !!args.help,
|
||||
version: !!args.version,
|
||||
port: args.port?.toString(),
|
||||
})
|
||||
} catch (createServerError) {
|
||||
|
||||
Reference in New Issue
Block a user