-
-
Notifications
You must be signed in to change notification settings - Fork 879
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
Adding support for include in map and support some proxy_cache options #1145
Conversation
- use include directive in map - proxy_cache_bypass - proxy_cache_lock
adding comments on file headers
templates/conf.d/map.erb
Outdated
@@ -6,6 +6,11 @@ map <%= @string %> $<%= @name %> { | |||
<% if @default -%> | |||
default <%= @default %>; | |||
<% end -%> | |||
<% if @includes.is_a?(Array) -%> |
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.
Can it ever not be an array?
templates/server/locations/proxy.erb
Outdated
@@ -46,4 +46,12 @@ | |||
<% if @proxy_cache_key -%> | |||
proxy_cache_key <%= @proxy_cache_key %>; | |||
<% end -%> | |||
<% if @proxy_cache_bypass && Array(@proxy_cache_bypass).size > 0 -%> |
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.
Is the size check needed?
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.
Initially when I've added theses features I've started from the 0.5.0 version which was published on forge and followed the same coding style, that's why there is this check I believe:
I totally agree with you it seems useless now.
@ceonizm thanks! Would it be possible to split this PR up by feature you’re adding? Eg support for access log in a location seems unrelated to the proxy_cache changes. |
I close this PR and open some new one from different branches in order to get all features splitted. |
@ceonizm Thanks. This will make it easier to review and get your additions merged. |
Hello,
I needed to use the include directive in a map block to handle some redirections that were dynamically generated by an other app. I noticed this feature was missing from your module so I've added it.
I've also added the support for proxy_cache_bypass and proxy_cache_lock
Hopes it helps.
Best Regards
François Boukhalfa