Skip to content

Commit 5d22aec

Browse files
committed
Added a prefix for the env-variable
1 parent 00838d0 commit 5d22aec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/common/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ export class HttpError extends Error {
2525
}
2626

2727
export const CookieKeys = {
28-
Session: `code-server-session${process.env?.COOKIE_SUFFIX ? "-" + process.env?.COOKIE_SUFFIX : ""}`,
28+
Session: `code-server-session${process.env?.CODE_SERVER_COOKIE_SUFFIX ? "-" + process.env?.CODE_SERVER_COOKIE_SUFFIX : ""}`,
2929
}

src/node/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const options: Options<Required<UserProvidedArgs>> = {
177177
type: "string",
178178
description:
179179
"Adds a suffix to the cookie. This can prevent a collision of cookies for subdomains, making them explixit. \n" +
180-
"Without this flag, no suffix is used. This can also be set with COOKIE_SUFFIX set to any string.",
180+
"Without this flag, no suffix is used. This can also be set with CODE_SERVER_COOKIE_SUFFIX set to any string.",
181181
},
182182
"disable-file-downloads": {
183183
type: "boolean",
@@ -623,8 +623,8 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
623623
usingEnvPassword = false
624624
}
625625

626-
if (process.env.COOKIE_SUFFIX) {
627-
args["cookie-suffix"] = process.env.COOKIE_SUFFIX
626+
if (process.env.CODE_SERVER_COOKIE_SUFFIX) {
627+
args["cookie-suffix"] = process.env.CODE_SERVER_COOKIE_SUFFIX
628628
}
629629

630630
if (process.env.GITHUB_TOKEN) {

0 commit comments

Comments
 (0)