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

Custom 404 page #173

Open
stephenjwatkins opened this issue Jun 16, 2022 · 1 comment
Open

Custom 404 page #173

stephenjwatkins opened this issue Jun 16, 2022 · 1 comment

Comments

@stephenjwatkins
Copy link

I'm using local-web-server to serve a SSG-built Next.js site. Everything's working well except for when I try to access a page that's not found. I'd like to serve the Next.js-generated 404.html file instead of the bare Not Found text. Is there a way to do this out of the box with the local-web-server CLI?

@75lb
Copy link
Member

75lb commented Jun 28, 2022

Hi, sorry for the slow reply.. Currently, there is no built-in feature to set a custom 404 response but I think there should be..

It's simple to create a custom 404 response using custom middleware (see the wiki), when I get a few hours spare I'll look into creating an example of how this is done..

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

No branches or pull requests

2 participants