Skip to content

Unquote the host in the Forwarded header - #8155

Open
Companion wants to merge 1 commit into
coder:mainfrom
Companion:fix-quoted-forwarded-host
Open

Companion wants to merge 1 commit into
coder:mainfrom
Companion:fix-quoted-forwarded-host

Conversation

@Companion

Copy link
Copy Markdown

fixes #7053

rfc 7239 lets forwarded values be quoted and a host with a port has to be so spring cloud gateway sends host="example.com:8080"
code-server kept the quotes so the origin check failed and web sockets got a 403 now the quotes are stripped before the check

@Companion
Companion requested a review from a team as a code owner November 24, 2026 04:08
RFC 7239 allows Forwarded values to be quoted strings, and a host with a
port has to be quoted because a colon is not allowed in a token. Proxies
like Spring Cloud Gateway send host="example.com:8080", which kept its
quotes, so the origin check failed and web sockets got a 403.
@Companion
Companion force-pushed the fix-quoted-forwarded-host branch from 57e5073 to a39a39c Compare November 24, 2026 07:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant