Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excludePathPrefixes config option is missing in dist folder #10

Closed
flohil opened this issue Jun 9, 2023 · 3 comments
Closed

excludePathPrefixes config option is missing in dist folder #10

flohil opened this issue Jun 9, 2023 · 3 comments

Comments

@flohil
Copy link

flohil commented Jun 9, 2023

Hi!

I just installed version 1.0.3 of edge-csrf and it seems the excludePathPrefixes config option is missing in the packaged dist folder.

image

As a workaround, one can manually skip the invocation of csrfProtect in middleware.ts:

export async function middleware(req: NextRequest) {
  const res = NextResponse.next();

  if (!req.nextUrl.pathname.startsWith('/_next/')) {
    csrfProtect(req, res);
  }
@amorey
Copy link
Member

amorey commented Jun 10, 2023

Thanks for the heads up! Try v1.0.4:
https://www.npmjs.com/package/edge-csrf/v/1.0.4

@amorey
Copy link
Member

amorey commented Jun 12, 2023

@flohil Did v1.0.4 fix the issue?

@flohil
Copy link
Author

flohil commented Jun 13, 2023

Hey @amorey! Version 1.0.4 now includes the excludePathPrefixes config option in the dist folder. Thank you for the fast fix!

@flohil flohil closed this as completed Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants