Title: Databrowser "open in" link generates wrong URL on reverse-proxy deployments · Issue #361 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Databrowser "open in" link generates wrong URL on reverse-proxy deployments · Issue #361 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Databrowser "open in" link generates wrong URL on reverse-proxy deployments · Issue #361 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary When JSS is deployed behind a reverse proxy (Caddy / nginx / Cloudflare etc.) — the recommended --single-user + reverse-proxy pattern documented in #348 / #349 — the "open in databrowser" link points to the wrong location. Observ...
Open Graph Description: Summary When JSS is deployed behind a reverse proxy (Caddy / nginx / Cloudflare etc.) — the recommended --single-user + reverse-proxy pattern documented in #348 / #349 — the "open in databrowser" l...
X Description: Summary When JSS is deployed behind a reverse proxy (Caddy / nginx / Cloudflare etc.) — the recommended --single-user + reverse-proxy pattern documented in #348 / #349 — the "open in databrows...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/361
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Databrowser \"open in\" link generates wrong URL on reverse-proxy deployments","articleBody":"## Summary\n\nWhen JSS is deployed behind a reverse proxy (Caddy / nginx / Cloudflare etc.) — the recommended `--single-user` + reverse-proxy pattern documented in #348 / #349 — the \"open in databrowser\" link points to the wrong location. Observed on a wild deployment running JSS upstream.\n\n## Reproduction\n\n1. Deploy JSS in `--single-user` mode behind a reverse proxy (e.g., Caddy on `:443` proxying to JSS on a local port)\n2. Visit the deployed pod URL (e.g., `https://pod.example.com/`)\n3. Observe the generated \"open in databrowser\" link\n4. Link resolves to a URL using the internal listening host/port rather than the public request host\n\nReal-world example: `https://pod.mpeters.dev/` (Caddy + JSS, HTTPS 443, HTTP/2+3) — the databrowser link is incorrect for the public-facing URL.\n\n## Likely root cause\n\nJSS likely constructs the databrowser link using the internal `request.hostname` / listening port rather than honoring reverse-proxy headers:\n\n- `X-Forwarded-Host` — the original `Host` header before the proxy\n- `X-Forwarded-Proto` — the original scheme (`https`)\n- `X-Forwarded-Port` (less standardized but used by some proxies)\n\nOn a direct (non-proxied) single-host deployment, internal and external URLs coincide so the bug is invisible. On reverse-proxy deployments — which is the recommended pattern for production — the internal and external URLs diverge.\n\n## Acceptance criteria\n\n- \"Open in databrowser\" link is generated from the public-facing URL when reverse-proxy headers are present\n- Trust `X-Forwarded-Host` and `X-Forwarded-Proto` (and `X-Forwarded-Port` if present) when constructing the link\n- Fall back to the request's own `Host` header / scheme when no proxy headers present (preserves existing direct-deployment behavior)\n- Add a regression test simulating reverse-proxy headers\n- Consider whether the fix should also apply to other generated URLs (links in container listings, redirect targets, IDP issuer URL, etc.) — likely yes; reverse-proxy URL discipline is server-wide, not databrowser-specific\n\n## Notes for implementation\n\n- Fastify exposes proxy headers via `request.headers['x-forwarded-host']` etc. directly\n- Or `app.set('trust proxy', true)` if Fastify supports an equivalent\n- Care needed: trusting `X-Forwarded-*` blindly is a security concern if JSS is internet-exposed without a proxy in front. The existing `--baseDomain` / `--idp-issuer` config patterns suggest a reasonable default: trust proxy headers when configured to (e.g., `--trust-proxy` flag), default to off for direct-exposure safety.\n\n## Strategic context (informational)\n\nThis is the kind of bug that affects voluntary-adoption operators specifically (those running the recommended `--single-user` + reverse-proxy pattern). Fixing it removes friction for the architectural deployment pattern JSS upstream recommends.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-06T23:46:18Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/361"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:835ff52c-a020-6f69-9708-1ef0fd7617a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFC8:1F40:5DA06D:76E280:6B039F1C |
| html-safe-nonce | 4b2eb4f717fd8275e0a9679812a8019c84ca8dafd298c853a8c3ef1a968b0349 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkM4OjFGNDA6NURBMDZEOjc2RTI4MDo2QjAzOUYxQyIsInZpc2l0b3JfaWQiOiI0ODU3ODg0MTQxMzEzODI2NTg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 07eed8f5d31167f8ad76af8dbdd510eaee53f2d81e4c61455e955ec1483dd557 |
| hovercard-subject-tag | issue:4395156133 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/361/issue_layout |
| twitter:image | https://opengraph.githubassets.com/db9fb32a5bb4e08301d4a6102a605f04f3be4e1a8749dd16e5ede209e71953d6/JavaScriptSolidServer/JavaScriptSolidServer/issues/361 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/db9fb32a5bb4e08301d4a6102a605f04f3be4e1a8749dd16e5ede209e71953d6/JavaScriptSolidServer/JavaScriptSolidServer/issues/361 |
| og:image:alt | Summary When JSS is deployed behind a reverse proxy (Caddy / nginx / Cloudflare etc.) — the recommended --single-user + reverse-proxy pattern documented in #348 / #349 — the "open in databrowser" l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width