-
Notifications
You must be signed in to change notification settings - Fork 106
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
Always serve index page for --pushstate #53
Conversation
For applications that utilize HTML5 pushstate to mange the URL, it's desirable for the server to always return the index.html page instead of a 404. Passing `--pushstate` on the command line will return the index.html if no other resource matches the path. Issue: mattdesl#41
Looks great, thanks! About to get on a plane for vacation so I won't be near a computer for a couple weeks. Will review after. 👍 |
@mattdesl sounds good, enjoy the time off |
@mattdesl any updates on getting this merged? I'd really like to have it. Awesome project btw! |
Always serve index page for --pushstate
Pushed to 4.2.0 😄 thanks for the PR! |
Love it -- can move fully off wzrd now! |
I haven't used this feature much, but it looks like the current |
Also it looks like |
If you set the status code to 404, the browser will ignore it for other resources types. Although it's a little funny that the expected html page is sent as a 404, the browser will render the page as expected. The other option is to inspect the Accepts header to see what the expectations for the response are. This will be hard to test as every browser does it differently. |
Always serve index page for --pushstate
For applications that utilize HTML5 pushstate to mange the URL, it's
desirable for the server to always return the index.html page instead of
a 404.
Passing
--pushstate
on the command line will return the index.html ifno other resource matches the path.
Issue: #41