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

Fix request check in node 16 #1250

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Fix request check in node 16 #1250

merged 3 commits into from
Jun 13, 2023

Conversation

adamjmcgrath
Copy link
Contributor

📋 Changes

Request is a Proxy to Request in Node 16 on development server in Next.js. Fallback to checking req.headers in these instances.

📎 References

fixes: #1246

@adamjmcgrath adamjmcgrath requested a review from a team as a code owner June 13, 2023 10:50
@vercel
Copy link

vercel bot commented Jun 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nextjs-auth0 ⬜️ Ignored (Inspect) Jun 13, 2023 1:02pm

@adamjmcgrath adamjmcgrath added the review:small Small review label Jun 13, 2023
expect(isRequest(req)).toBe(true);
expect(isRequest(reqNode16)).toBe(true);
expect(isRequest(reqNext)).toBe(true);
expect(isRequest(nodeReq)).toBe(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include expect(isRequest(nextApiReq)).toBe(false);?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure - let me add that too

@adamjmcgrath adamjmcgrath merged commit e5afcca into beta Jun 13, 2023
@adamjmcgrath adamjmcgrath deleted the req-utils branch June 13, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants