49beb91993
This is the best way I found to tackle the problem of custom directives, trying to avoid common usage of module involve hacking the module/template to be able place custom directives. Right now support was added only for location context (default and custom ones), it expects a hash with key value and it's supported on all current location types. Added an example inside location.pp, usage it's pretty easy.
9 lines
309 B
Text
9 lines
309 B
Text
location <%= location %> {
|
|
<% if @location_cfg_prepend -%><% location_cfg_prepend.each do |key,value| -%>
|
|
<%= key %> <%= value %>;
|
|
<% end -%><% end -%>
|
|
stub_status on;
|
|
<% if @location_cfg_append -%><% location_cfg_append.each do |key,value| -%>
|
|
<%= key %> <%= value %>;
|
|
<% end -%><% end -%>
|
|
}
|