From 6a2ad6fcfb1ded6b80204ee09d8f1c4431ef7121 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Thu, 2 Feb 2023 17:07:34 +1100 Subject: [PATCH] fix: remove credentials: 'include' from fetch requests --- studio/lib/common/fetch/delete.ts | 1 - studio/lib/common/fetch/get.ts | 2 -- studio/lib/common/fetch/head.ts | 2 -- studio/lib/common/fetch/patch.ts | 1 - studio/lib/common/fetch/post.ts | 1 - 5 files changed, 7 deletions(-) diff --git a/studio/lib/common/fetch/delete.ts b/studio/lib/common/fetch/delete.ts index ff5a2f3f4eb..4bedf25cfac 100644 --- a/studio/lib/common/fetch/delete.ts +++ b/studio/lib/common/fetch/delete.ts @@ -14,7 +14,6 @@ export async function delete_( const response = await fetch(url, { method: 'DELETE', body: JSON.stringify(data), - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions, diff --git a/studio/lib/common/fetch/get.ts b/studio/lib/common/fetch/get.ts index dc4f56a0816..58b3f8946d3 100644 --- a/studio/lib/common/fetch/get.ts +++ b/studio/lib/common/fetch/get.ts @@ -12,7 +12,6 @@ export async function get( const headers = await constructHeaders(requestId, optionHeaders) const response = await fetch(url, { method: 'GET', - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions, @@ -37,7 +36,6 @@ export async function getWithTimeout( const headers = await constructHeaders(requestId, optionHeaders) const response = await fetch(url, { method: 'GET', - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions, diff --git a/studio/lib/common/fetch/head.ts b/studio/lib/common/fetch/head.ts index 6d7e7f42d6e..2bcba4895f3 100644 --- a/studio/lib/common/fetch/head.ts +++ b/studio/lib/common/fetch/head.ts @@ -13,7 +13,6 @@ export async function head( const headers = await constructHeaders(requestId, optionHeaders) const response = await fetch(url, { method: 'HEAD', - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions, @@ -39,7 +38,6 @@ export async function headWithTimeout( const headers = await constructHeaders(requestId, optionHeaders) const response = await fetch(url, { method: 'HEAD', - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions, diff --git a/studio/lib/common/fetch/patch.ts b/studio/lib/common/fetch/patch.ts index 9ca15e0c989..7fcf4aad2c9 100644 --- a/studio/lib/common/fetch/patch.ts +++ b/studio/lib/common/fetch/patch.ts @@ -14,7 +14,6 @@ export async function patch( const response = await fetch(url, { method: 'PATCH', body: JSON.stringify(data), - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions, diff --git a/studio/lib/common/fetch/post.ts b/studio/lib/common/fetch/post.ts index e4757dc34a6..c71f86a14b6 100644 --- a/studio/lib/common/fetch/post.ts +++ b/studio/lib/common/fetch/post.ts @@ -14,7 +14,6 @@ export async function post( const response = await fetch(url, { method: 'POST', body: JSON.stringify(data), - credentials: 'include', referrerPolicy: 'no-referrer-when-downgrade', headers, ...otherOptions,