Skip to content
Merged
Changes from all commits
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
11 changes: 11 additions & 0 deletions nginx.conf.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# The backend needs the real request scheme (DPoP `htu` checks and secure cookies).
# TLS ends at the ingress, so nginx itself sees http and `$scheme` would lie; pass the
# ingress-provided value through and fall back to $scheme only when it is absent.
map $http_x_forwarded_proto $mip_forwarded_proto {
# Only a real https claim counts; normalises HTTPS and chains like 'https,http'.
# Anything else (spoofed or absent) falls back to the container's own $scheme.
~*^https https;
default $scheme;
}

server {
listen 80;
server_tokens off;
Expand All @@ -14,6 +24,7 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $mip_forwarded_proto;
}

# Angular shell route for the notebook page (must not proxy to JupyterHub).
Expand Down
Loading