-
Notifications
You must be signed in to change notification settings - Fork 399
fix:Configuring server.baseURL will make the api route inaccessible #1871
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
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Changeset missing |
|
||
// api | ||
const match = matchAPIRoute(new URL(event.request.url).pathname, event.request.method); | ||
const match = matchAPIRoute(event.nativeEvent.path, event.request.method); |
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.
The event.nativeEvent.path
includes the query string 1 and the matchAPIRoute
won't work in this case.
Maybe:
const [pathname] = event.nativeEvent.path.split("?", 2);
const match = matchAPIRoute(pathname, event.request.method);
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.
so your saying this won't work? @thislight
More templates
commit: |
PR Checklist
Please check if your PR fulfills the following requirements:
server.baseURL
will make theapi
route inaccessible #1857What is the current behavior?
api route return 404
What is the new behavior?
api route return 200
Other information
none