-
Notifications
You must be signed in to change notification settings - Fork 696
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
Allow dynamic file-based checks in router #162
Comments
Doesn't |
I think he is referring to internal routing. Basically it requires something like that: route-if-file-exists = ${DOCUMENT_ROOT}/${REQUEST_URI} goto:foobar i will check if there is a way to accomplish that without adding a new option |
Yes, exactly that. |
It'd be nice it it also allowed to check for directories/executable files as with mod_rewrite. That's e.g. useful for adding missing slashes:
|
Added the "route_condition" subsystem. You can add new conditions with plugins too. Currently supported conditions: exists examples: route-if = exists:${DOCUMENT_ROOT}/${REQUEST_URI} static:${DOCUMENT_ROOT}/${REQUEST_URI} |
Awesome! Would you mind adding an isexec condition? |
pretty easy: |
Thanks again. |
It would be useful if the new router supported dynamically checking for files like Apache's mod_rewrite with
or nginx with
Note that in contrast to if-dir/if-file the checks would have to be performed at any request rather than during evaluation of the configuration file.
The text was updated successfully, but these errors were encountered: