From 8f793211a590bae77948b82a9efb52b1eba4f098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Bru=CC=88ckner?= Date: Mon, 29 Sep 2014 17:48:04 -0400 Subject: [PATCH] Fix proxy_set_header for default location --- manifests/resource/vhost.pp | 1 + spec/defines/resource_vhost_spec.rb | 9 --------- templates/vhost/vhost_header.erb | 3 --- templates/vhost/vhost_ssl_header.erb | 3 --- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index 48b9f54..3f65d48 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -493,6 +493,7 @@ define nginx::resource::vhost ( proxy_cache => $proxy_cache, proxy_cache_valid => $proxy_cache_valid, proxy_method => $proxy_method, + proxy_set_header => $proxy_set_header, proxy_set_body => $proxy_set_body, fastcgi => $fastcgi, fastcgi_params => $fastcgi_params, diff --git a/spec/defines/resource_vhost_spec.rb b/spec/defines/resource_vhost_spec.rb index 9587765..24dafa8 100644 --- a/spec/defines/resource_vhost_spec.rb +++ b/spec/defines/resource_vhost_spec.rb @@ -198,15 +198,6 @@ describe 'nginx::resource::vhost' do :value => true, :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', :attr => 'rewrite_to_https', diff --git a/templates/vhost/vhost_header.erb b/templates/vhost/vhost_header.erb index ee6380f..8369a96 100644 --- a/templates/vhost/vhost_header.erb +++ b/templates/vhost/vhost_header.erb @@ -69,9 +69,6 @@ server { <% if Array(@resolver).count > 0 -%> resolver <% Array(@resolver).each do |r| %> <%= r %><% end %>; <% end -%> -<% @proxy_set_header.each do |header| -%> - proxy_set_header <%= header %>; -<% end -%> <% if @add_header -%> <%- @add_header.each do |key,value| -%> add_header <%= key %> <%= value %>; diff --git a/templates/vhost/vhost_ssl_header.erb b/templates/vhost/vhost_ssl_header.erb index 41e348e..7bd0e61 100644 --- a/templates/vhost/vhost_ssl_header.erb +++ b/templates/vhost/vhost_ssl_header.erb @@ -116,9 +116,6 @@ server { <% Array(@passenger_cgi_param).each do |key,value| -%> passenger_set_cgi_param <%= key %> <%= value %>; <% end -%> -<% Array(@proxy_set_header).each do |header| -%> - proxy_set_header <%= header %>; -<% end -%> <% Array(@add_header).each do |key,value| -%> add_header <%= key %> <%= value %>; <% end -%>