-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
vite 5 preview return 404 on /
if Accept Header is missing
#15022
Closed
7 tasks done
Labels
Comments
9 tasks
Thanks @sapphi-red , that was quick. |
This was referenced Nov 18, 2023
Is this really fixed? Still getting errors:
|
@titenis the fix was released a few hours ago in v5.0.1, please check that you have that version. If it is still failing, please create a new issue with a minimal repro (maybe you hit another issue) |
9 tasks
I reproduced it. I should have tested with wait-on as well. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
vite preview
/
with Accept Header gives a 200 and theindex.html
/
without Accept Header gives a 404 and a empty bodyThis is a changed behavior to vite 4.
This lead to that
npx wait-on http://localhost:4173
will never finish and blocks. Which is also used in https://github.com/cypress-io/github-action#wait-on. The workaround is to usenpx wait-on http://localhost:4173/index.html
If I read the rfc right this behavior is also not according to https://www.rfc-editor.org/rfc/rfc7231#section-5.3.2
The minimal reproduction is only a new project with
npm create vite@latest
Reproduction
https://github.com/StefanSchoof/vite-empty-accept
Steps to reproduce
npm run build
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: