From a9bd24c6ef440dc07757af0f38388ec3318fcbe5 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 30 Nov 2021 17:04:15 -0500 Subject: [PATCH] Remove User-Agent header again. The addition of this header triggers the browser to send an OPTIONS request with a CORS preflight request. profiler-symbol-server doesn't currently know how to deal with this, so symbolication with profiler-symbol-server is broken. This works around it. --- src/profile-logic/mozilla-symbolication-api.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/profile-logic/mozilla-symbolication-api.js b/src/profile-logic/mozilla-symbolication-api.js index 5283c42e97..dc34dd95d0 100644 --- a/src/profile-logic/mozilla-symbolication-api.js +++ b/src/profile-logic/mozilla-symbolication-api.js @@ -246,11 +246,6 @@ export function requestSymbols( body: JSON.stringify(body), method: 'POST', mode: 'cors', - // Use a profiler-specific user agent, so that the symbolication server knows - // what's making this request. - headers: new Headers({ - 'User-Agent': `FirefoxProfiler/1.0 (+${location.origin}) ${navigator.userAgent}`, - }), }) .then((response) => response.json()) .then(_ensureIsAPIResultV5);