Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: use unique cookies for workspace proxies#19930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deansheather merged 1 commit intomainfromdean/subdomain-cookie
Sep 24, 2025

Conversation

deansheather
Copy link
Member

@deansheatherdeansheather commentedSep 24, 2025
edited
Loading

There is currently an issue with subdomain workspace apps on workspace proxies, where if you have a workspace proxy wildcard nested beneath the primary wildcard, cookies from the primary may be sent to the server before cookies from the proxy specifically.

Currently:

  1. Use a subdomain app via the primary proxy*.coder.corp.com
    a. Client sends no cookies
    a. Server does token smuggling flow
    a. Server sets a cookiecoder_subdomain_app_session_token on*.coder.corp.com
    a. Server redirects client to reload the page
    a. Request should succeed as usual
  2. Wait until the primary proxy's session token cookie has expired in the database (or make it invalid yourself)
  3. Use a subdomain app via a separate proxy*.sydney.coder.corp.com
    a. Client sendscoder_subdomain_app_session_token cookie from*.coder.corp.com
    a. Server validates supplied cookie, it fails because it's expired
    a. Server does token smuggling flow
    a. Server sets a cookiecoder_subdomain_app_session_token on*.sydney.coder.corp.com
    a. Server redirects client to reload page
    a. Client sends BOTH cookies.
    a. The server will only process the first cookie it receives, so if the expired cookie for the primary proxy is sent first the request will end up in a permanent loop on step b.

The fix is to append_{hash(wildcard_access_url)} to the subdomain cookies as we cannot control browser behavior further. This avoids the conflict as each proxy will only read it's specific cookie.

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

I have seen this issue before, this solution is neat 👍

@deansheatherdeansheather merged commit42dd544 intomainSep 24, 2025
35 checks passed
@deansheatherdeansheather deleted the dean/subdomain-cookie branchSeptember 24, 2025 14:30
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 24, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@deansheatherdeansheather

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@deansheather@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp