Skip to content
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

Closed
wants to merge 14 commits into from

Conversation

ceonizm
Copy link
Contributor

@ceonizm ceonizm commented Nov 9, 2017

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

   - use include directive in map
   - proxy_cache_bypass
   - proxy_cache_lock
adding comments on file headers
@ceonizm ceonizm changed the title Adding support for include in map and support sur some proxy options Adding support for include in map and support some proxy_cache options Nov 9, 2017
@@ -6,6 +6,11 @@ map <%= @string %> $<%= @name %> {
<% if @default -%>
default <%= @default %>;
<% end -%>
<% if @includes.is_a?(Array) -%>
Copy link
Member

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?

@@ -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 -%>
Copy link
Member

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?

Copy link
Contributor Author

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.

@alexjfisher
Copy link
Member

@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.

@ceonizm
Copy link
Contributor Author

ceonizm commented Nov 16, 2017

@ceonizm ceonizm closed this Nov 16, 2017
@alexjfisher
Copy link
Member

@ceonizm Thanks. This will make it easier to review and get your additions merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants