chore(bidi): handle CORS preflight requests#39213
Conversation
This comment has been minimized.
This comment has been minimized.
62e506d to
439ac1c
Compare
This comment has been minimized.
This comment has been minimized.
439ac1c to
87fab46
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
||
| // handle CORS preflight requests | ||
| if (param.request.method === 'OPTIONS') { | ||
| // TODO: we should detect preflight requests by looking at param.initiator.type, but the Bidi spec for |
There was a problem hiding this comment.
I don't know about other types, but marking preflight sounds non-controversial.
There was a problem hiding this comment.
I've changed the condition to if (param.initiator?.type === 'preflight' || requestHeaders['access-control-request-method'])
Co-authored-by: Yury Semikhatsky <yurys@chromium.org> Signed-off-by: Holger Benl <hbenl@evandor.de>
Test results for "tests 1"4 failed 4 flaky38551 passed, 843 skipped Merge workflow run. |
Test results for "MCP"1 failed 4778 passed, 135 skipped Merge workflow run. |
Fixes the following tests in
page/page-event-request.spec.ts: