From 068f19461a19de3c4a5a28ebd41fef279e45cf64 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 19 Mar 2020 06:22:51 -0700 Subject: [PATCH] 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 --- desktop/static/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/static/main.ts b/desktop/static/main.ts index aaaf79e37..d8e9f37d3 100644 --- a/desktop/static/main.ts +++ b/desktop/static/main.ts @@ -214,8 +214,8 @@ function configureSession() { }, (details, callback) => { // 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.referer = 'https://localhost:3000/index.dev.html'; + details.requestHeaders.origin = 'http://localhost:3000'; + details.requestHeaders.referer = 'http://localhost:3000/index.dev.html'; callback({cancel: false, requestHeaders: details.requestHeaders}); }, );