-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Push state option #194
Push state option #194
Conversation
Noticed that this doesn't work well if you're including JS files as well. Going to update to make it work as a fallback so if a file exists it is served. |
Updated logic in 5dd25b5. |
This comment has been minimized.
This comment has been minimized.
I agree with @indexzero, this is a better implementation than #205. +1 for the merge. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@indexzero Could you merge this? |
Nice implementation that doesn't disable directory listing. It looks like somebody has published it to npm: https://www.npmjs.com/package/spa-http-server. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Used the |
Has anyone here tried it along with setting proxy option for http-server (-P www.something.com)? |
@ekulabuhov, thanks for this! Where is the code for this spa-http-server fork? Could this be merged over? It's an amazing feature and spa-http-server works like a charm for me! |
We're adding a "self-proxying" approach to the README to address this issue, see #513 That should address this sort of usage without breaking the focus of this project on providing accurate HTTP responses. spa-http-server is available as a fork which focuses on SPA usage. |
First try at implementing an option to support push state by rewriting all request URLs to use
/index.html
instead of the URL requested.Does this conflict with other options? I'm concerned about changing the requested URL.
This was originally requested as part of #80