Skip to content

scope gateway cors to the dashboard origin - #473

Open
ben564885 wants to merge 1 commit into
onecli:mainfrom
ben564885:fix/gateway-cors-origin
Open

scope gateway cors to the dashboard origin#473
ben564885 wants to merge 1 commit into
onecli:mainfrom
ben564885:fix/gateway-cors-origin

Conversation

@ben564885

Copy link
Copy Markdown

fixes #472.

the gateway reflected any cors origin with credentials on, so any website could drive the authenticated browser api — in local mode the auth extractor resolves local-admin from no request state. this replaces alloworigin::mirror_request() with an exact match on the dashboard's own origin (app_url, else the loopback fallback) via response::dashboard_url().

verified in a real browser: before, a page on another origin read and approved a pending human-approval; after, the same page is blocked by cors while the legitimate dashboard origin still works. all 519 gateway tests pass, plus a regression test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

gateway cors reflects any origin, exposing the authenticated browser api

1 participant