Skip to content

Commit

Permalink
adds options method check
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmkennedy committed Jan 31, 2025
1 parent 61d2378 commit 6e926f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/core/app/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function createOriginCheckMiddleware(): MiddlewareHandler {
if (isPrerendered) {
return next();
}
if (request.method === 'GET' || request.method === "HEAD") {
if (request.method === 'GET' || request.method === "HEAD" || request.method === "OPTIONS") {
return next();
}
const sameOrigin =
Expand Down

0 comments on commit 6e926f5

Please sign in to comment.