Merge pull request #467 from invliD/proxy-header-fix
Impossible to set proxy_set_header for default location
This commit is contained in:
commit
ea942297ac
4 changed files with 1 additions and 15 deletions
|
@ -493,6 +493,7 @@ define nginx::resource::vhost (
|
||||||
proxy_cache => $proxy_cache,
|
proxy_cache => $proxy_cache,
|
||||||
proxy_cache_valid => $proxy_cache_valid,
|
proxy_cache_valid => $proxy_cache_valid,
|
||||||
proxy_method => $proxy_method,
|
proxy_method => $proxy_method,
|
||||||
|
proxy_set_header => $proxy_set_header,
|
||||||
proxy_set_body => $proxy_set_body,
|
proxy_set_body => $proxy_set_body,
|
||||||
fastcgi => $fastcgi,
|
fastcgi => $fastcgi,
|
||||||
fastcgi_params => $fastcgi_params,
|
fastcgi_params => $fastcgi_params,
|
||||||
|
|
|
@ -198,15 +198,6 @@ describe 'nginx::resource::vhost' do
|
||||||
:value => true,
|
:value => true,
|
||||||
:notmatch => / root \/;/,
|
:notmatch => / root \/;/,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
:title => 'should set proxy_set_header',
|
|
||||||
:attr => 'proxy_set_header',
|
|
||||||
:value => ['header1','header2'],
|
|
||||||
:match => [
|
|
||||||
' proxy_set_header header1;',
|
|
||||||
' proxy_set_header header2;',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
:title => 'should rewrite to HTTPS',
|
:title => 'should rewrite to HTTPS',
|
||||||
:attr => 'rewrite_to_https',
|
:attr => 'rewrite_to_https',
|
||||||
|
|
|
@ -69,9 +69,6 @@ server {
|
||||||
<% if Array(@resolver).count > 0 -%>
|
<% if Array(@resolver).count > 0 -%>
|
||||||
resolver <% Array(@resolver).each do |r| %> <%= r %><% end %>;
|
resolver <% Array(@resolver).each do |r| %> <%= r %><% end %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% @proxy_set_header.each do |header| -%>
|
|
||||||
proxy_set_header <%= header %>;
|
|
||||||
<% end -%>
|
|
||||||
<% if @add_header -%>
|
<% if @add_header -%>
|
||||||
<%- @add_header.each do |key,value| -%>
|
<%- @add_header.each do |key,value| -%>
|
||||||
add_header <%= key %> <%= value %>;
|
add_header <%= key %> <%= value %>;
|
||||||
|
|
|
@ -116,9 +116,6 @@ server {
|
||||||
<% Array(@passenger_cgi_param).each do |key,value| -%>
|
<% Array(@passenger_cgi_param).each do |key,value| -%>
|
||||||
passenger_set_cgi_param <%= key %> <%= value %>;
|
passenger_set_cgi_param <%= key %> <%= value %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% Array(@proxy_set_header).each do |header| -%>
|
|
||||||
proxy_set_header <%= header %>;
|
|
||||||
<% end -%>
|
|
||||||
<% Array(@add_header).each do |key,value| -%>
|
<% Array(@add_header).each do |key,value| -%>
|
||||||
add_header <%= key %> <%= value %>;
|
add_header <%= key %> <%= value %>;
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Reference in a new issue