Skip to content

fix(dashboard): accept https Origin behind a TLS-terminating proxy - #2273

Open
The-AarushiSingh wants to merge 2 commits into
UsefulSoftwareCo:v2from
The-AarushiSingh:fix/batch-origin-proxy
Open

The-AarushiSingh wants to merge 2 commits into
UsefulSoftwareCo:v2from
The-AarushiSingh:fix/batch-origin-proxy

Conversation

@The-AarushiSingh

@The-AarushiSingh The-AarushiSingh commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2272

Behind a TLS-terminating proxy the container sees http:// while the browser sends Origin: https://, so sameOrigin never matched and every batch POST returned 403.

When X-Forwarded-Proto is https, the origin is compared as https://…. Host check and application/json requirement are unchanged.

Tests added:
proxied origin + header → accepted
same origin without header → still 403
foreign host + header → still 403

Reproduced on Railway self-host: every POST /api/dashboard/batch returned 403 while the rest of the dashboard worked.

@The-AarushiSingh
The-AarushiSingh marked this pull request as ready for review October 12, 2026 16:28

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant