Skip to content

Commit

Permalink
Fix CSRF error on register endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Aug 25, 2024
1 parent 58d90ca commit 20aaa09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/middleware/csrf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { Middleware } from '@curveball/kernel';

const safeMethods = ['GET', 'OPTIONS', 'REPORT', 'HEAD', 'SEARCH', 'QUERY'];
const safePaths = ['/login', '/logout', '/authorize'];
const safePaths = [
'/authorize',
'/login',
'/logout',
'/register',
];

export default function(): Middleware {

Expand Down

0 comments on commit 20aaa09

Please sign in to comment.