Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit 7ae84fd

Browse files
authored
fix: don't send cookies if we have an access token (#288)
1 parent 9ec9eb5 commit 7ae84fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/shared/backend/graphql.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function requestGraphQL<T extends GQL.IGraphQLResponseRoot>({
6868
url: `${url}/.api/graphql` + queryName,
6969
headers,
7070
crossDomain: true,
71-
withCredentials: true,
71+
withCredentials: !(headers && headers.authorization),
7272
body: JSON.stringify({ query: request, variables }),
7373
async: true,
7474
}).pipe(

src/shared/backend/lsp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const request = (url: string, method: string, requests: any[]): Observable<AjaxR
5252
url: `${url}/.api/xlang/${method || ''}`,
5353
headers,
5454
crossDomain: true,
55-
withCredentials: true,
55+
withCredentials: !(headers && headers.authorization),
5656
body: JSON.stringify(requests),
5757
async: true,
5858
})

0 commit comments

Comments
 (0)