Skip to content

Conversation

@Timon-D3v
Copy link
Contributor

I added the cookie-suffix flag and environment variable. This adds the possibility for the user to fix the issue but the default option would still be the same (Best for backwards compatibility).

This PR does fix the issue #7544 where a subdomain would not use the right cookie because of the wildcard cookie set by a domain of higher order.

@Timon-D3v Timon-D3v requested a review from a team as a code owner December 3, 2025 20:19
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took so long to review this. I like the direction we are headed!

…to set the set the cookie-suffix via environment variable or inline flag
@Timon-D3v Timon-D3v requested a review from code-asher December 11, 2025 11:51
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you!!

export enum CookieKeys {
Session = "code-server-session",
export function getCookieSessionName(suffix?: string): string {
return suffix ? `code-server-session-${suffix.replace(/[^a-zA-Z0-9\-]/g, "-")}` : "code-server-session";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo right good catch on the alphanumeric

@code-asher code-asher merged commit 68ac95b into coder:main Dec 12, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants