From c3bcd080801f9947d889b79c91698a7840c52b65 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 10:39:46 -0400 Subject: [PATCH] remove cookies Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser.tsx | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 680e3964ca..e50b4847a2 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -61,25 +61,11 @@ type Props = { }; export const handleAuthRequest = ({ - legacyIncludeCookies, authCallback, }: { - legacyIncludeCookies?: boolean; authCallback: Props['authCallback']; }): HandleRequest => { - let cookies = {}; - if (legacyIncludeCookies) { - cookies = { credentials: 'include' }; - } else if (legacyIncludeCookies !== undefined) { - cookies = { credentials: 'omit' }; - } else { - cookies = {}; - } - - const handleRequestWithCookiePref: HandleRequest = async ( - endpointUrl, - options, - ) => + const handleRequest: HandleRequest = async (endpointUrl, options) => fetch(endpointUrl, { ...options, headers: { @@ -88,9 +74,8 @@ export const handleAuthRequest = ({ Authorization: `Bearer ${await authCallback()}`, }), }, - ...cookies, }); - return handleRequestWithCookiePref; + return handleRequest; }; export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { @@ -115,7 +100,6 @@ export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { className={classes.explorer} graphRef={endpoints[tabIndex].graphRef} handleRequest={handleAuthRequest({ - legacyIncludeCookies: false, authCallback: authCallback, })} persistExplorerState={endpoints[tabIndex].persistExplorerState}