René's URL Explorer Experiment


Title: Split proxy request paths on / instead of path.sep by adityajai119 · Pull Request #8123 · coder/code-server · GitHub

Open Graph Title: Split proxy request paths on / instead of path.sep by adityajai119 · Pull Request #8123 · coder/code-server

X Title: Split proxy request paths on / instead of path.sep by adityajai119 · Pull Request #8123 · coder/code-server

Description: Fixes #8122 The /proxy// routes compute the base path that they strip from the request with req.path.split(path.sep).slice(0, 3).join(path.sep). path.sep is \ on Windows, but URL paths always use /, so on Windows the split returned the whole path and the whole path became the base. Every request was proxied to / on the target port (only the query string was kept), redirects from the proxied app were rewritten against the wrong base, and the web socket route had the same problem. This splits the request path on / instead and drops the path import that is no longer used. Testing, on Windows 11 with Node 24.22.1: test/unit/node/proxy.test.ts on main: 9 of 19 tests fail with Expected: 200, Received: 404. With this change all of them pass. CI runs the unit tests on Linux, where path.sep is /, so I added a test that sets path.sep to \ while it runs. It fails on main with a 404 and passes with this change. npx tsc --noEmit -p tsconfig.json, ESLint and Prettier on the changed files. AI-assisted: drafted with an AI coding agent; the tests above were run locally.

Open Graph Description: Fixes #8122 The /proxy/<port>/ routes compute the base path that they strip from the request with req.path.split(path.sep).slice(0, 3).join(path.sep). path.sep is \ on Windows, but URL paths ...

X Description: Fixes #8122 The /proxy/&lt;port&gt;/ routes compute the base path that they strip from the request with req.path.split(path.sep).slice(0, 3).join(path.sep). path.sep is \ on Windows, but UR...

Opengraph URL: https://github.com/coder/code-server/pull/8123

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d226ea84-b608-4638-08fd-0bfcaedfd7fb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDEC2:1AE20C:351F4E1:4349A28:6B01D8B5
html-safe-nonceedb2cd98aba48900da80b51d10ec2c07e2a35adc501b9b2f6f99119195daedfa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUMyOjFBRTIwQzozNTFGNEUxOjQzNDlBMjg6NkIwMUQ4QjUiLCJ2aXNpdG9yX2lkIjoiMTE2MjYzMDc3ODE5MDk0NDQzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb44f6e9dd47f40b7d01a0e7052bca0c1b12a2c7a15bf9a6f6f88f21b4d6e49e4
hovercard-subject-tagpull_request:5282404812
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/code-server/pull/8123/files
twitter:imagehttps://avatars.githubusercontent.com/u/139571373?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/139571373?s=400&v=4
og:image:altFixes #8122 The /proxy/<port>/ routes compute the base path that they strip from the request with req.path.split(path.sep).slice(0, 3).join(path.sep). path.sep is \ on Windows, but URL paths ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/code-server git https://github.com/coder/code-server.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id172953845
octolytics-dimension-repository_nwocoder/code-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id172953845
octolytics-dimension-repository_network_root_nwocoder/code-server
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/code-server/pull/8123/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fpull%2F8123%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fpull%2F8123%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=coder%2Fcode-server
Reloadhttps://github.com/coder/code-server/pull/8123/files
Reloadhttps://github.com/coder/code-server/pull/8123/files
Reloadhttps://github.com/coder/code-server/pull/8123/files
coderhttps://github.com/coder
code-serverhttps://github.com/coder/code-server
Codehttps://github.com/coder/code-server
Issues147 (147)https://github.com/coder/code-server/issues
Pull requests17 (17)https://github.com/coder/code-server/pulls
Discussionshttps://github.com/coder/code-server/discussions
Actionshttps://github.com/coder/code-server/actions
Projectshttps://github.com/coder/code-server/projects
Security and quality3 (3)https://github.com/coder/code-server/security
Insightshttps://github.com/coder/code-server/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcode-server%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcode-server%2Fissues%2Fnew%2Fchoose
code-asherhttps://github.com/code-asher
coder:mainhttps://github.com/coder/code-server/tree/main
adityajai119:fix/proxy-base-path-windowshttps://github.com/adityajai119/code-server/tree/fix/proxy-base-path-windows
Conversation 1 https://github.com/coder/code-server/pull/8123
Commits 1 https://github.com/coder/code-server/pull/8123/commits
Checks 13 https://github.com/coder/code-server/pull/8123/checks
Files changed https://github.com/coder/code-server/pull/8123/files
Please reload this pagehttps://github.com/coder/code-server/pull/8123/files
Split proxy request paths on / instead of path.sep https://github.com/coder/code-server/pull/8123/files#top
Show all changes 1 commit https://github.com/coder/code-server/pull/8123/files
bcd9cd3 Split proxy request paths on / instead of path.sep adityajai119 Nov 12, 2026 https://github.com/coder/code-server/pull/8123/commits/bcd9cd3f3fbdd8cf58ab1dca11b878d7057ea40b
Clear filters https://github.com/coder/code-server/pull/8123/files
Please reload this pagehttps://github.com/coder/code-server/pull/8123/files
Please reload this pagehttps://github.com/coder/code-server/pull/8123/files
pathProxy.ts https://github.com/coder/code-server/pull/8123/files#diff-e19d5adcef3be4508b5591d103132e7b373b19056434ad9d0ce74d040561fdbd
proxy.test.ts https://github.com/coder/code-server/pull/8123/files#diff-2d8f49b1e48e4d7c9e6d068602abf69eb278ae56b04948ff9a41e237849b993a
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
src/node/routes/pathProxy.tshttps://github.com/coder/code-server/pull/8123/files#diff-e19d5adcef3be4508b5591d103132e7b373b19056434ad9d0ce74d040561fdbd
View file https://github.com/adityajai119/code-server/blob/bcd9cd3f3fbdd8cf58ab1dca11b878d7057ea40b/src/node/routes/pathProxy.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8123/{{ revealButtonHref }}
https://github.com/coder/code-server/pull/8123/files#diff-e19d5adcef3be4508b5591d103132e7b373b19056434ad9d0ce74d040561fdbd
https://github.com/coder/code-server/pull/8123/files#diff-e19d5adcef3be4508b5591d103132e7b373b19056434ad9d0ce74d040561fdbd
https://github.com/coder/code-server/pull/8123/files#diff-e19d5adcef3be4508b5591d103132e7b373b19056434ad9d0ce74d040561fdbd
https://github.com/coder/code-server/pull/8123/files#diff-e19d5adcef3be4508b5591d103132e7b373b19056434ad9d0ce74d040561fdbd
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
test/unit/node/proxy.test.tshttps://github.com/coder/code-server/pull/8123/files#diff-2d8f49b1e48e4d7c9e6d068602abf69eb278ae56b04948ff9a41e237849b993a
View file https://github.com/adityajai119/code-server/blob/bcd9cd3f3fbdd8cf58ab1dca11b878d7057ea40b/test/unit/node/proxy.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8123/{{ revealButtonHref }}
https://github.com/coder/code-server/pull/8123/files#diff-2d8f49b1e48e4d7c9e6d068602abf69eb278ae56b04948ff9a41e237849b993a
https://github.com/coder/code-server/pull/8123/files#diff-2d8f49b1e48e4d7c9e6d068602abf69eb278ae56b04948ff9a41e237849b993a
Please reload this pagehttps://github.com/coder/code-server/pull/8123/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.