-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Apply routing constraint to […] bind? #1636
Comments
You can't because constraints are applied to bindings and The best approach for your case is probably to write a middleware that you put between |
@essen Thank you for response I appreciate you clarifying what is possible at this time and I will investigate the approach you recommended. Is the omission of this feature a design choice? Or is it desirable and simply not implemented yet? If this is a feature that is not wanted, I think there is value in updating the documentation to explicitly mention that using constraints with I’m happy to help with this as best as I can. Please let me know if either of the above appeals to you and I will do my best to craft a suitable PR. Thanks again |
Documentation updates are always welcome, regardless of why things are as they are. In this case, the code is a few years old so I'm not sure why it's only applying to explicitly bound values. I likely have not thought about using them with |
Hello,
Is it possible to apply a constraint to the
…
binding? I’m trying to use the:cowboy_static
handler while keeping certain files from being served (e.g., *.php). I can apply a constraint to any of the regular binds and not that one; it doesn’t seem to come up in the list of binds.If it’s not available, a syntax like
[:foo…]
may be a good approach. If that is of interest, I can try to implement it.Thank you in advane.
The text was updated successfully, but these errors were encountered: