Include credentials in requests (#721)
* feat(request manager): adds header to send cookies, and other auths with every request * refactor(.gitignore): removes local env from .gitignores
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,4 +8,4 @@ build/*
|
||||
|
||||
tools/scripts/github_token.json
|
||||
|
||||
src/lib/graphql/schema.json
|
||||
src/lib/graphql/schema.json
|
||||
@@ -138,7 +138,7 @@ export class GraphQLClient extends BaseClient<
|
||||
}
|
||||
|
||||
private createUploadLink() {
|
||||
return createUploadLink({ uri: () => this.getBaseUrl() });
|
||||
return createUploadLink({ uri: () => this.getBaseUrl(), credentials: 'include' });
|
||||
}
|
||||
|
||||
private createWSLink() {
|
||||
|
||||
@@ -27,7 +27,9 @@ export class RestClient
|
||||
extends BaseClient<typeof fetch, RequestInit, (url: string, data: any) => Promise<Response>>
|
||||
implements IRestClient
|
||||
{
|
||||
private config: RequestInit = {};
|
||||
private config: RequestInit = {
|
||||
credentials: 'include',
|
||||
};
|
||||
|
||||
public readonly fetcher = async (
|
||||
url: string,
|
||||
|
||||
Reference in New Issue
Block a user