Skip to content

Commit 3018bb7

Browse files
committed
text: expliccit content type headers on infra client
1 parent 0edfd68 commit 3018bb7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/lib/clients/api.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ import type { paths as InfraPaths } from '@/types/infra-api'
33

44
export const infra = createClient<InfraPaths>({
55
baseUrl: process.env.INFRA_API_URL,
6-
fetch: ({ url, headers, body, method, ...options }) => {
6+
headers: {
7+
'Content-Type': 'application/json',
8+
Accept: 'application/json',
9+
},
10+
credentials: 'include',
11+
fetch: ({ url, headers, body, method, credentials, ...options }) => {
712
return fetch(url, {
813
headers,
914
body,
1015
method,
16+
credentials,
1117
...options,
1218
})
1319
},

0 commit comments

Comments
 (0)