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
Requests with an Origin header should be accepted when it matches. You can validate the allowlist logic at least for HTTP endpoints like /api/metrics (even if WS is the main target):
For WebSocket specifically, you can also sanity-check missing-Origin behavior using a non-browser WS client that omits the header. For example with websocat (if installed):
# no Origin header
websocat -v ws://127.0.0.1:8090/ws
# explicitly set Origin
websocat -v -H="Origin: http://localhost:8090" ws://127.0.0.1:8090/ws
The exact handshake result depends on the WS route, but the key is whether origin_allowed() blocks the request pre-handshake.
Note: exact browser behavior around sending Origin can vary; this repro focuses on the concrete (and common) case of non-browser clients / missing header.
Activity
flyingrobots commentedon Jan 2, 2026
Quick repro notes
/api/metrics(even if WS is the main target):curl -i \ -H "Origin: http://localhost:8090" \ http://127.0.0.1:8090/api/metrics--allow-originis set (today’s behavior):Expected (current):
403(or otherwise denied)Desired (if we change semantics):
200websocat(if installed):The exact handshake result depends on the WS route, but the key is whether
origin_allowed()blocks the request pre-handshake.Note: exact browser behavior around sending
Origincan vary; this repro focuses on the concrete (and common) case of non-browser clients / missing header.echo-session-ws-gateway: document strict Origin allowlist (#214)
Merge pull request #218 from flyingrobots/echo/origin-policy-doc-214
flyingrobots commentedon Jan 2, 2026
Decision: keep strict (missing rejected) and document it clearly. Landed in PR #218.
flyingrobots commentedon Jan 2, 2026
Decision: keep --allow-origin strict (missing Origin rejected) and document it clearly. Landed in PR #218.