-
Notifications
You must be signed in to change notification settings - Fork 49
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
How to detect if path does not exist 404 #41
Comments
You can do this now with |
Thanks for the help, that's exactly what I needed. There's a little bit of new route detection that I had to do, but it may actually be cleaner this way. That could just be because my app is small right now however. |
I agree with the approach @hueniverse offered, though I would probably use a plain directory handler, and handle the proxy behavior in the To detect when to apply this behavior, as the hook is called for all routes, you can use the I will leave this request open for now in case others want to chime in but I don't really think it is worth the effort to include this functionality in |
I did look at This app really tears the face off of a bad site, and it's gonna take a crowbar to get this sucker off. |
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. |
I am trying to setup a cache proxy thing, if the file is on disk I want to just serve it up, otherwise I'll proxy the request, pipe the response to the client, and write the file to disk. I have the code for the proxy working fine, I would just like to hook into reply.file() if it is going to return a 404 error. Is this possible, or beyond the scope of this module?
The text was updated successfully, but these errors were encountered: