diff --git a/desktop/app/src/dispatcher/pluginDownloads.tsx b/desktop/app/src/dispatcher/pluginDownloads.tsx index 8257d6bcc..6bb7f0acc 100644 --- a/desktop/app/src/dispatcher/pluginDownloads.tsx +++ b/desktop/app/src/dispatcher/pluginDownloads.tsx @@ -102,6 +102,10 @@ async function handlePluginDownload( adapter: axiosHttpAdapter, cancelToken: cancellationSource.token, responseType: 'stream', + headers: { + 'Sec-Fetch-Site': 'none', + 'Sec-Fetch-Mode': 'navigate', + }, onDownloadProgress: async (progressEvent) => { const newPercentCompleted = !progressEvent.total ? 0 diff --git a/desktop/static/main.ts b/desktop/static/main.ts index 0e23f02fd..cbd840b98 100644 --- a/desktop/static/main.ts +++ b/desktop/static/main.ts @@ -253,6 +253,9 @@ function configureSession() { urls: ['*://*/*'], }, (details, callback) => { + // setting sec-fetch-site to always be 'none' so Flipper requests are not blocked by SecFetch policies + details.requestHeaders['Sec-Fetch-Site'] = 'none'; + details.requestHeaders['Sec-Fetch-Mode'] = 'navigate'; // setting Origin to always be 'localhost' to avoid issues when dev version and release version behaves differently. details.requestHeaders.origin = 'http://localhost:3000'; details.requestHeaders.referer = 'http://localhost:3000/index.dev.html';