Skip to content

Commit 8ea8015

Browse files
committed
fix: do not send Access-Control-Allow-Credentials
Cookies to not reliably work. BREAKING CHANGE: this removes the Access-Control-Allow-Credentials
1 parent 1c93362 commit 8ea8015

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/corsHeaders.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ void describe('corsHeaders()', () => {
1111
},
1212
}),
1313
{
14-
'Access-Control-Allow-Credentials': true,
1514
'Access-Control-Allow-Headers':
1615
'accept, authorization, content-type, if-match, origin',
1716
'Access-Control-Expose-Headers':

src/corsHeaders.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ export const corsHeaders = (
2424
allowedMethods = ['PUT', 'DELETE', 'POST', 'GET', 'PATCH'],
2525
cacheForSeconds = 600,
2626
): {
27-
'Access-Control-Allow-Credentials': true
2827
'Access-Control-Allow-Headers': string
2928
'Access-Control-Expose-Headers': string
3029
'Access-Control-Allow-Methods': string
3130
'Access-Control-Allow-Origin': string
3231
'Access-Control-Max-Age': number
3332
Vary: 'Origin'
3433
} => ({
35-
'Access-Control-Allow-Credentials': true,
3634
'Access-Control-Allow-Origin': origin({ headers }),
3735
'Access-Control-Allow-Methods': allowedMethods.join(', '),
3836
'Access-Control-Allow-Headers': Array.from(

0 commit comments

Comments
 (0)