Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 492e5f7

Browse files
down with cookies!
1 parent 67c350b commit 492e5f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/http.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const mapResponse = async (response: Response): Promise<HttpResponse> => {
5454

5555
const get = ({ link, headers = {} }: HttpRequest) =>
5656
fetch(link.href, {
57+
credentials: 'omit',
5758
headers: new Headers({
5859
accept: link.type || mediaTypes.any,
5960
...headers,
@@ -71,6 +72,7 @@ const post = <TRequest extends object, TResponse extends object>({
7172
}: HttpRequestWithBody) =>
7273
fetch(link.href, {
7374
body: JSON.stringify(body),
75+
credentials: 'omit',
7476
headers: new Headers({
7577
accept: link.type || mediaTypes.any,
7678
'content-type': mediaTypes.json,
@@ -81,6 +83,7 @@ const post = <TRequest extends object, TResponse extends object>({
8183

8284
const _delete = ({ link, headers = {} }: HttpRequest) =>
8385
fetch(link.href, {
86+
credentials: 'omit',
8487
headers: new Headers({
8588
accept: link.type || mediaTypes.any,
8689
...headers,

0 commit comments

Comments
 (0)