feature: add configurable proxy_method to vhost and location resources
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
8691db1c83
commit
a578dcea50
3 changed files with 10 additions and 0 deletions
|
@ -47,6 +47,8 @@
|
|||
# The same zone can be used in multiple places.
|
||||
# [*proxy_cache_valid*] - This directive sets the time for caching
|
||||
# different replies.
|
||||
# [*proxy_method*] - If defined, overrides the HTTP method of the
|
||||
# request to be passed to the backend.
|
||||
# [*auth_basic*] - This directive includes testing name and password
|
||||
# with HTTP Basic Authentication.
|
||||
# [*auth_basic_user_file*] - This directive sets the htpasswd filename for
|
||||
|
@ -111,6 +113,7 @@ define nginx::resource::location (
|
|||
$try_files = undef,
|
||||
$proxy_cache = false,
|
||||
$proxy_cache_valid = false,
|
||||
$proxy_method = undef,
|
||||
$auth_basic = undef,
|
||||
$auth_basic_user_file = undef,
|
||||
$priority = 500
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
# The same zone can be used in multiple places.
|
||||
# [*proxy_cache_valid*] - This directive sets the time for caching
|
||||
# different replies.
|
||||
# [*proxy_method*] - If defined, overrides the HTTP method of the
|
||||
# request to be passed to the backend.
|
||||
# [*auth_basic*] - This directive includes testing name and
|
||||
# password with HTTP Basic Authentication.
|
||||
# [*auth_basic_user_file*] - This directive sets the htpasswd filename for
|
||||
|
@ -112,6 +114,7 @@ define nginx::resource::vhost (
|
|||
$proxy_set_header = [],
|
||||
$proxy_cache = false,
|
||||
$proxy_cache_valid = false,
|
||||
$proxy_method = undef,
|
||||
$fastcgi = undef,
|
||||
$fastcgi_params = '/etc/nginx/fastcgi_params',
|
||||
$fastcgi_script = undef,
|
||||
|
@ -199,6 +202,7 @@ define nginx::resource::vhost (
|
|||
proxy_read_timeout => $proxy_read_timeout,
|
||||
proxy_cache => $proxy_cache,
|
||||
proxy_cache_valid => $proxy_cache_valid,
|
||||
proxy_method => $proxy_method,
|
||||
fastcgi => $fastcgi,
|
||||
fastcgi_params => $fastcgi_params,
|
||||
fastcgi_script => $fastcgi_script,
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
<% end -%>
|
||||
proxy_pass <%= @proxy %>;
|
||||
proxy_read_timeout <%= @proxy_read_timeout %>;
|
||||
<% if not @proxy_method.nil? -%>
|
||||
proxy_method <%= @proxy_method %>;
|
||||
<% end -%>
|
||||
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
||||
<%= key %> <%= value %>;
|
||||
<% end -%><% end -%>
|
||||
|
|
Loading…
Reference in a new issue