Page MenuHomePhabricator

[blob-service] Set up CORS
ClosedPublic

Authored by bartek on Apr 29 2023, 9:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 27, 12:20 AM
Unknown Object (File)
Fri, May 26, 8:51 PM
Unknown Object (File)
Fri, May 26, 9:42 AM
Unknown Object (File)
Wed, May 24, 10:02 PM
Unknown Object (File)
Mon, May 22, 9:25 AM
Unknown Object (File)
Apr 30 2023, 4:19 PM
Unknown Object (File)
Apr 30 2023, 4:19 PM
Unknown Object (File)
Apr 30 2023, 10:36 AM
Subscribers

Details

Summary

Details in ENG-3820 - we need to set up CORS for blob service to work on web.

Test Plan

Made GET and POST/PUT blob service requests from localhost web client ant from native. Tested both local sandbox and production service.
Without this change, the requests fail with CORS errors on web, they're fine on native.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Apr 29 2023, 9:24 AM

New dependency looks good. Not familiar with Rust

jon added inline comments.
services/blob/src/http/mod.rs
21 ↗(On Diff #25936)

not directly related to this diff, but I would like to move away from --sandbox, and instead just see if the binary is in debug mode.

#[cfg(debug_assertions)]
fn is_sandbox() {
  return true;
}

Also gets rid of a bunch of branching logic

This revision is now accepted and ready to land.May 1 2023, 12:16 PM
This revision was automatically updated to reflect the committed changes.