summaryrefslogtreecommitdiff
path: root/extensions/fetch/26_fetch.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-08-02 15:56:52 +0200
committerGitHub <noreply@github.com>2021-08-02 15:56:52 +0200
commit505d253436153b34a60018c732b55e900a331859 (patch)
treec6732b9470cb6da432fdcd63d268e373b9140616 /extensions/fetch/26_fetch.js
parent3a2e94492b0d4df1ae5c3bb5a6a6a899538de10b (diff)
Revert "fix(extensions/fetch): Add Origin header to outgoing requests for fetch (#11557)" (#11565)
This reverts commit f87aa44d94240327fb4ab1dc756d70f71247edb4.
Diffstat (limited to 'extensions/fetch/26_fetch.js')
-rw-r--r--extensions/fetch/26_fetch.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/extensions/fetch/26_fetch.js b/extensions/fetch/26_fetch.js
index f6cfced14..f7166001e 100644
--- a/extensions/fetch/26_fetch.js
+++ b/extensions/fetch/26_fetch.js
@@ -40,8 +40,6 @@
TypeError,
Uint8Array,
} = window.__bootstrap.primordials;
- const { getLocationHref } = window.__bootstrap.location;
- const { URL } = window.__bootstrap.url;
const REQUEST_BODY_HEADER_NAMES = [
"content-encoding",
@@ -431,17 +429,6 @@
}
requestObject.signal[abortSignal.add](onabort);
- const baseURL = getLocationHref();
- if (
- baseURL &&
- (requestObject.method !== "GET" && requestObject.method !== "HEAD")
- ) {
- ArrayPrototypePush(request.headerList, [
- "origin",
- new URL(baseURL).origin,
- ]);
- }
-
if (!requestObject.headers.has("accept")) {
ArrayPrototypePush(request.headerList, ["accept", "*/*"]);
}