Use http://localhost for origin instead of https

Summary:
Follow up of D20454562

We now set an origin header, but use https instead of http, which is currently not supported by the public RN version (for the internal RN version support was added in D20526486).

However, not promoting ourselves as running on a secured connection seems like the more trustworthy thing to do, and better reflects reality.

Reviewed By: nikoant

Differential Revision: D20534363

fbshipit-source-id: e26fabd77013920e4c58fdbf552bb909f0499cae
This commit is contained in:
Michel Weststrate
2020-03-19 06:22:51 -07:00
committed by Facebook GitHub Bot
parent a624b064a8
commit 068f19461a

View File

@@ -214,8 +214,8 @@ function configureSession() {
}, },
(details, callback) => { (details, callback) => {
// setting Origin to always be 'localhost' to avoid issues when dev version and release version behaves differently. // setting Origin to always be 'localhost' to avoid issues when dev version and release version behaves differently.
details.requestHeaders.origin = 'https://localhost:3000'; details.requestHeaders.origin = 'http://localhost:3000';
details.requestHeaders.referer = 'https://localhost:3000/index.dev.html'; details.requestHeaders.referer = 'http://localhost:3000/index.dev.html';
callback({cancel: false, requestHeaders: details.requestHeaders}); callback({cancel: false, requestHeaders: details.requestHeaders});
}, },
); );