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

Handling 404 error #38

Closed
JbIPS opened this issue Aug 17, 2015 · 2 comments
Closed

Handling 404 error #38

JbIPS opened this issue Aug 17, 2015 · 2 comments
Assignees
Labels
support Questions, discussions, and general support

Comments

@JbIPS
Copy link

JbIPS commented Aug 17, 2015

Hi,
I'm playing with the directory handler, which greatly simplified my code, but I'm missing the possibility to redirect to a custom 404 page when the file does not exist.

Is there a way to do that, like with a reverse proxy or a function in the parameters of the handlers?

Thank you,

Jb

@kanongil
Copy link
Contributor

kanongil commented Sep 3, 2015

Sorry for the delayed response but this issue slipped by me some somehow.

Inert does not currently provide any such functionality by itself as it is more of a server level issue. See the onPostHandler section in https://github.com/hapijs/inert#customized-file-response for an example on how to handle this.

If you need further help, I suggest you make a post in the hapijs/discuss repo.

@kanongil kanongil closed this as completed Sep 3, 2015
@kanongil kanongil self-assigned this Sep 3, 2015
@Marsup Marsup added support Questions, discussions, and general support and removed question labels Sep 21, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

3 participants