Skip to content

Accept act_as query param on /fmsg/ws and allow PATCH in CORS#32

Merged
markmnl merged 1 commit into
mainfrom
ws-act-as-query-param
Jul 9, 2026
Merged

Accept act_as query param on /fmsg/ws and allow PATCH in CORS#32
markmnl merged 1 commit into
mainfrom
ws-act-as-query-param

Conversation

@markmnl

@markmnl markmnl commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Browsers cannot set custom headers on a WebSocket upgrade, so the X-FMSG-Act-As header alone cannot reach GET /fmsg/ws from a web client. Accept an act_as query parameter as an alternative (header wins when both are present); validation is identical to the header path.

Also add PATCH to the default CORS allowed methods — browser preflights for PATCH /fmsg/sub-accounts/:agent (update CIDRs) were rejected.

Browsers cannot set custom headers on a WebSocket upgrade, so the
X-FMSG-Act-As header alone cannot reach GET /fmsg/ws from a web client.
Accept an act_as query parameter as an alternative (header wins when
both are present); validation is identical to the header path.

Also add PATCH to the default CORS allowed methods — browser preflights
for PATCH /fmsg/sub-accounts/:agent (update CIDRs) were rejected.

Co-Authored-By: Claude Fable 5 <[email protected]>
@markmnl markmnl merged commit 845f4f4 into main Jul 9, 2026
1 check passed
@markmnl markmnl deleted the ws-act-as-query-param branch July 9, 2026 07:33
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