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

Support NextRequest and NextResponse #524

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kino-ma
Copy link

@kino-ma kino-ma commented Jan 14, 2022

In Next.js's middleware (_middleware.js etc.), we use NextRequest and NextResponse as contexts. I want to pass them to nookies.get/set in the same style as others, so I added support for them in parseCookies and setCookie.

Also, I upgraded next version in dependencies so that the TypeScript compiler can refer to NextRequest and NextResponse that are newer features.

By this PR, #507 will be closed.

@yfhui
Copy link

yfhui commented Feb 17, 2022

I almost figured out the implementation myself but then I find out this pull request. Checked the commits and they look logical. I wonder when will it be merged? @maticzav

@snaerth
Copy link

snaerth commented Feb 24, 2022

It would be great to get a review on this PR? I would love to use the new _middleware feature with Nookies

@tareqlol
Copy link

tareqlol commented Apr 26, 2022

Hello all,
Any updates on this?, it is quite useful.

@snaerth
Copy link

snaerth commented May 24, 2022

@maticzav

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

Successfully merging this pull request may close these issues.

4 participants