-
Notifications
You must be signed in to change notification settings - Fork 48
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
Added defaultFilePath
option to directory handler
#48
Conversation
Thanks for the PR. Your use-case seems to be related to #41, though @digitaldesigndj was using the Regarding the extension handler case: Note that you can I'll look further into it later. |
Ok, I have to admit that I don't fully understand anything right now. But with that disclaimer, I am comfortable saying that detecting Inert failure (with data!) seems like a useful use case? I am very happy to see an enhancement tag here! Also super Hapi to say that I write server side coffee. |
Hi, Is there anyway to pass this PR ? I have the exact same use-case (using Hapi to serve an Angular 2 (well 4 :)) webapp) and without those changes, I cannot reload my page without having a 404. I'm not sure it related to #41 actually. It does cover some of the same ground but the end result is not the same (or I'm missing something). |
@JJayet I'm looking into it right now, actually. Both this and #41 essentially want to do "something" when a file is not found. I am reluctant to merge this PR, since it only applies to a very specific "something", and I would much prefer a solution that applies to more use-cases. Especially when this can already be handled, albeit in a convoluted, sub-optimal manner, with the existing framework apis. |
@kanongil I get it. Is there anything I could do to help you ? |
Same need here, hapi and angular4 (so SPA routing involved). |
Is this still happening or should we close it? |
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. |
Hey,
I'm using
inert
to serve web apps with client side routing and didn't find an easy way of specifying the default file to be served on sub paths.I know I could use a global
onPreResponse
handler to check if the response was 404 and reply with the default file instead, but that also catches other REST endpoints that I don't want to modify.Let me know what you think of this :)