Page MenuHomePhabricator

Fix CORS issues with identity HTTP
ClosedPublic

Authored by marcin on Jul 10 2024, 6:28 AM.
Tags
None
Referenced Files
F3536745: D12719.diff
Wed, Dec 25, 6:49 PM
Unknown Object (File)
Sun, Dec 22, 5:32 PM
Unknown Object (File)
Sun, Dec 22, 5:32 PM
Unknown Object (File)
Sun, Dec 22, 5:32 PM
Unknown Object (File)
Sun, Dec 22, 5:32 PM
Unknown Object (File)
Sun, Dec 22, 5:32 PM
Unknown Object (File)
Sun, Dec 22, 5:32 PM
Unknown Object (File)
Sun, Dec 22, 5:32 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.