Skip to content
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

use $http_host in nginx proxy header #4671

Merged
merged 1 commit into from Jan 11, 2024
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Jan 11, 2024

$host is the hostname, $http_host is hostname[:port], which is what's needed here if a port is specified.

$host works fine in the example because it uses the default port 80/443 in which case the two variables have the same value. But if it's on a different port, the two will differ, resulting in cross-origin check errors in the singleuser websocket requests because hostname != hostname:port.

$host is the hostname, $http_host is `hostname[:port]`, which is what's needed here

$host works fine in the example because it uses the default port 80, but if it's on a different port
it will differ from the http Host header, resulting in cross-origin check errors.
@manics manics merged commit efb5789 into jupyterhub:main Jan 11, 2024
4 checks passed
@minrk minrk deleted the nginx-http-host branch January 12, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants