Page MenuHomePhabricator

Fix CORS issues with identity HTTP
ClosedPublic

Authored by marcin on Jul 10 2024, 6:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 10:39 PM
Unknown Object (File)
Tue, Nov 5, 3:22 AM
Unknown Object (File)
Tue, Nov 5, 3:22 AM
Unknown Object (File)
Tue, Nov 5, 3:22 AM
Unknown Object (File)
Mon, Oct 28, 8:47 PM
Unknown Object (File)
Wed, Oct 23, 11:40 AM
Unknown Object (File)
Oct 14 2024, 8:22 PM
Unknown Object (File)
Oct 14 2024, 8:22 PM
Subscribers

Details

Summary

The context is here: https://linear.app/comm/issue/ENG-8806/unable-to-call-identity-http-endpoint-from-service-workerjs-due-to. There were two CORS issues with identity HTTP. This differential applies two fixes from Varun and Will combined

Test Plan

Execute test plan for https://phab.comm.dev/D12703 (D12703). Without changes in this diff it is not possible to succesfully fetch inbound keys from service worker.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-8806
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

services/identity/Cargo.toml
45 ↗(On Diff #42206)

@varun Should we normalize adding cargo crates to the cargo workspace Cargo.toml?

services/identity/src/constants.rs
313 ↗(On Diff #42206)

So besides for authorization, accept is also required?

services/identity/src/websockets/mod.rs
116 ↗(On Diff #42206)

We can probably remove this comment as the code is self-explanatory

varun added inline comments.
services/identity/Cargo.toml
45 ↗(On Diff #42206)

yeah good call-out. we should add this in the root Cargo.toml instead

This revision is now accepted and ready to land.Jul 10 2024, 11:55 PM
services/identity/src/constants.rs
313 ↗(On Diff #42206)

It is possible that it is not necessary but I will need a test to confirm.

services/identity/src/constants.rs
313 ↗(On Diff #42206)

Confirming that accept header is not necessary

Address Varun's and Will's feedbacks

This revision was landed with ongoing or failed builds.Jul 15 2024, 3:04 AM
This revision was automatically updated to reflect the committed changes.