Skip to content

Commit cf72c5c

Browse files
Séafraalanpq
authored andcommitted
fix: include credentials in all requests to support cross-site api location
1 parent 8065a70 commit cf72c5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/CoralServer.svelte.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class CoralServer {
3535
const token = building ? '' : page.url.searchParams.get('token');
3636
return createClient<paths>({
3737
baseUrl: `${(config.PUBLIC_API_PATH || base) ?? '/'}`,
38-
headers: { Authorization: token ? `Bearer ${token}` : undefined }
38+
headers: { Authorization: token ? `Bearer ${token}` : undefined },
39+
credentials: 'include'
3940
});
4041
});
4142

0 commit comments

Comments
 (0)