Skip to content
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

404 Errors are Actually 200?! #380

Closed
dav-is opened this issue Sep 21, 2017 · 4 comments
Closed

404 Errors are Actually 200?! #380

dav-is opened this issue Sep 21, 2017 · 4 comments

Comments

@dav-is
Copy link

dav-is commented Sep 21, 2017

Do you want to request a feature or report a bug? bug

What is the current behavior?
No 404 pages, and even on the preact home page, 404 pages are actually showing 200!!
If the current behavior is a bug, please provide the steps to reproduce.
Go to http://localhost:8080/randomstringthatisntroute
Open chrome network panel
See that it responds with 200

What is the expected behavior?
Throw an actual 404 error, make it easy to define error pages inside preact-cli

If this is a feature request, what is motivation or use case for changing the behavior?
Obviously this is horrible for SEO

@lukeed
Copy link
Member

lukeed commented Sep 21, 2017

There's no server included -- that's where the status codes come from.

The Router included will act as a catch-all if and only if you choose to redirect all paths to the index. This is the included configuration, but only if you use our config on your server.

@dav-is
Copy link
Author

dav-is commented Sep 21, 2017

I thought this package included some server side rendering?

@lukeed
Copy link
Member

lukeed commented Sep 21, 2017

There's _pre_rendering, which produces populated HTML files for static hosting.

@dav-is
Copy link
Author

dav-is commented Sep 21, 2017

Oh ok that makes sense. The README references server side rendering (which I wouldn't say is the same thing as prerendering) and it confused me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants