-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Prerendering with +server.js blocks cURL requests #10102
Comments
I think you may have forgotten a commit in your repro -- there's no |
Hey, it's part of the set up steps [see the README.md]. Just simply run:
|
Ahhh, okay, yeah -- I don't believe this is a bug. There are two things at play here:
This PR will throw an error when you try to do this: https://github.com/sveltejs/kit/pull/9994/files |
This makes sense now I read it. I wonder if there's a way we can better document / make this obvious. I feel like adding actual documentation around it might cause confusion when this is very much a niche issue. It's unfortunate that preview isn't working as-per vercel, but I'm not sure what we can do about this - Vercel does some magic hosting pre-rendered files directly on the edge, whereas I assume the node adapter would not, so perhaps we have to put this down to adapter specifics and accept that preview will always behave a bit more like the node adapter than anything else. |
Closed via #11256, having conflicting route definitions / both a |
Describe the bug
When attempting to cURL a preview build of SvelteKit that uses
prerender
within a+server.js
file a405 Method not allowed
is returned. However when providing an extra "Accept" header200 OK
is returned, and when using+page.server.js
instead a200 OK
is returned.Example repository linked below.
Reproduction
https://github.com/dextermb/svelte-kit-prerender-405-server-js
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: