Skip to content

Commit

Permalink
fix:(csrf) fix typo of csrf middleware (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuaki640 committed Jul 23, 2024
1 parent 8dc9e48 commit e8118e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/csrf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const csrf = (options?: CSRFOptions): MiddlewareHandler => {
return handler(origin, c)
}

return async function cors(c, next) {
return async function csrf(c, next) {
if (
!isSafeMethodRe.test(c.req.method) &&
isRequestedByFormElementRe.test(c.req.header('content-type') || '') &&
Expand Down

0 comments on commit e8118e3

Please sign in to comment.