Details in ENG-3820 - we need to set up CORS for blob service to work on web.
Details
- Reviewers
tomek • jon varun ashoat - Commits
- rCOMM2a42a7dad94a: [blob-service] Set up CORS
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
No Lint Coverage - Unit
No Test Coverage
Event Timeline
services/blob/src/http/mod.rs | ||
---|---|---|
21 | 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 |
We definitely should return something from this lambda since otherwise it is useless to assign it to variable.
If we find that we don't have permissions then just calling await this.requestAndroidNotificationsPermission(); would result in a prompt asking for notifications permissions. However if the user grants those permissions then hasPermissions is still falsy (since promise returned nothing), so deviceToken will be set to null. Nevertheless permissions are actually granted byt the OS, so the state on the device and keyserver would heal itself on next render.
This differential fixes this case so that if user grants permissions correct state is achieved immediately without need for additional re-render to heal the state.