Skip to content

Commit c359987

Browse files
committed
cors fix
1 parent 7aebf09 commit c359987

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

worker/src/middleware/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export async function cors(c: Context, next: Next) {
6969
return new Response(null, {
7070
headers: {
7171
'Access-Control-Allow-Origin': '*',
72-
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
72+
'Access-Control-Allow-Methods': 'GET, POST, PUT, PATCH, DELETE, OPTIONS',
7373
'Access-Control-Allow-Headers': 'Content-Type, Authorization, X-API-Key, X-CSRF-Token',
7474
'Access-Control-Max-Age': '86400',
7575
},
@@ -80,7 +80,7 @@ export async function cors(c: Context, next: Next) {
8080

8181
// Add CORS headers to response
8282
c.res.headers.set('Access-Control-Allow-Origin', '*');
83-
c.res.headers.set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
83+
c.res.headers.set('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE, OPTIONS');
8484
c.res.headers.set('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-API-Key, X-CSRF-Token');
8585
}
8686

0 commit comments

Comments
 (0)