-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
caddyhttp: Add map
handler
#3199
Conversation
Thanks Sarge! Excited to take a look at this more. However, the major features tree for 2.0 is closed now so the earliest we'd see a module like this is in 2.1. |
@sarge think you could rebase? 🙂 |
FYI, I am still thinking about this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @sarge -- I'm still trying to design final upgrades for v2.1 but I think there's a place for a map
directive (and handler) like this. These comments are my first pass, there will likely be more.
@mholt I think I have addressed the first round of feedback. Thanks for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the revisions! We're getting there :)
Let's give this a spin in the 2.2 dev tree, then. Thanks for working on this, @sarge! |
Simple map implementation. #2824
Open to suggestions around hybrid implementations or other data types.
Maps are resolved during request pipeline at the point in the pipeline, I did consider deferring evaluation to the point of substitution.
[edit]
A recurring idea I have for this feature is to make it more caddy-like, somehow taking the idea of matchers. It does make it more verbose specifying a matcher for each case.