8000 Allow OPTIONS requests through domain proxy by helgehatt · Pull Request #7284 · coder/code-server · GitHub
[go: up one dir, main page]

Skip to content

Allow OPTIONS requests through domain proxy #7284

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow OPTIONS requests through domain proxy
  • Loading branch information
helgehatt committed Mar 27, 2025
commit 931f7c011a94b8caf9289a4f573866703224b55c
5 changes: 5 additions & 0 deletions src/node/routes/domainProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ router.all(/.*/, async (req, res, next) => {
return next()
}

// OPTIONS requests should be allowed without credentials
if (req.method === "OPTIONS") {
return next()
}

// Assume anything that explicitly accepts text/html is a user browsing a
// page (as opposed to an xhr request). Don't use `req.accepts()` since
// *every* request that I've seen (in Firefox and Chromium at least)
Expand Down
0