Skip to content

Commit fbbb8be

Browse files
committed
fix(cors): allow authorization header
1 parent df4fa4d commit fbbb8be

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/corsHeaders.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ void describe('corsHeaders()', () => {
1212
}),
1313
{
1414
'Access-Control-Allow-Credentials': true,
15-
'Access-Control-Allow-Headers': 'content-type, accept, if-match',
15+
'Access-Control-Allow-Headers':
16+
'content-type, accept, if-match, authorization',
1617
'Access-Control-Expose-Headers':
1718
'x-amzn-requestid, etag, apigw-requestid',
1819
'Access-Control-Allow-Methods': 'PUT, DELETE, POST, GET, PATCH',

src/corsHeaders.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const corsHeaders = (
3333
'Access-Control-Allow-Credentials': true,
3434
'Access-Control-Allow-Origin': origin({ headers }),
3535
'Access-Control-Allow-Methods': allowedMethods.join(', '),
36-
'Access-Control-Allow-Headers': 'content-type, accept, if-match',
36+
'Access-Control-Allow-Headers':
37+
'content-type, accept, if-match, authorization',
3738
'Access-Control-Expose-Headers': 'x-amzn-requestid, etag, apigw-requestid',
3839
'Access-Control-Max-Age': cacheForSeconds,
3940
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#cors_and_caching

0 commit comments

Comments
 (0)