You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c43599a
Browse filesBrowse the repository at this point in the historyBrowse files
Forward client Host (with port) and scheme in reverse-proxy templates
The reverse-proxy templates set `proxy_set_header Host $host`, which
normalises the Host header and drops any non-standard port, and they
never forward the request scheme. Downstream apps that build absolute
URLs from the request (e.g. Drupal, Next.js) therefore emit URLs with
the wrong port and scheme when the proxy is published on a non-standard
host port such as https://app.local:37103 — the generated links point at
https://app.local (port 443) and 404.
Use $http_host to preserve the exact Host the client sent (including the
port), and forward X-Forwarded-Proto $scheme so the backend knows the
public scheme. Both listen ports (80/443) share one server block, so
$scheme is correct for either. Applied to all four reverse-proxy
variants (proxy, nextjs, storybook, vite); the drupal variant already
passes HTTP_HOST/HTTPS via fastcgi_params.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments