-
Notifications
You must be signed in to change notification settings - Fork 23
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: host not included in route handler urls #234
Conversation
🦋 Changeset detectedLatest commit: 5cee06c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
94c515a
to
5cee06c
Compare
@conico974 could you please take a look when you have time? Thanks! |
I was also thinking that we might want to switch to not using external middleware at least until we have a better story for multi worker app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and adding a test!
fixes #210
Research into what happens internally in Next.js is available in #210 (comment).
OpenNext is removing the
trustHostHeader: true
option from the Next.js config if routing is disabled, and it considers routing disabled whenconfig.middleware.external
is truthy. This value is required to be true in the OpenNext config used for deploying to Cloudflare.This PR changes the check to not strip it if there is external middleware.