Page MenuHomePhabricator

Fix CORS issues with identity HTTP
ClosedPublic

Authored by marcin on Wed, Jul 10, 6:28 AM.
Tags
None
Referenced Files
F2369881: D12719.id42278.diff
Wed, Jul 31, 6:26 PM
Unknown Object (File)
Sun, Jul 28, 1:12 AM
Unknown Object (File)
Sat, Jul 27, 1:17 PM
Unknown Object (File)
Sat, Jul 27, 10:13 AM
Unknown Object (File)
Sat, Jul 27, 9:29 AM
Unknown Object (File)
Sat, Jul 27, 9:29 AM
Unknown Object (File)
Sat, Jul 27, 9:29 AM
Unknown Object (File)
Sat, Jul 27, 9:29 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.Wed, Jul 10, 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.Mon, Jul 15, 3:04 AM
This revision was automatically updated to reflect the committed changes.