Skip to content

Commit

Permalink
Merge pull request voxpupuli#956 from xaque208/fastcgi_param_param
Browse files Browse the repository at this point in the history
Add fastcgi_param parameter to vhost resource
  • Loading branch information
jyaworski authored Nov 1, 2016
2 parents c5c84f9 + 989f3c7 commit 5aaf21c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# [*resolver*] - Array: Configures name servers used to resolve
# names of upstream servers into addresses.
# [*fastcgi*] - location of fastcgi (host:port)
# [*fastcgi_param*] - Set additional custom fastcgi_params
# [*fastcgi_params*] - optional alternative fastcgi_params file to use
# [*fastcgi_script*] - optional SCRIPT_FILE parameter
# [*uwsgi_read_timeout*] - optional value for uwsgi_read_timeout
Expand Down Expand Up @@ -248,6 +249,7 @@
$proxy_buffering = undef,
$resolver = [],
$fastcgi = undef,
$fastcgi_param = undef,
$fastcgi_params = "${::nginx::config::conf_dir}/fastcgi_params",
$fastcgi_script = undef,
$uwsgi = undef,
Expand Down Expand Up @@ -645,6 +647,7 @@
proxy_set_body => $proxy_set_body,
proxy_buffering => $proxy_buffering,
fastcgi => $fastcgi,
fastcgi_param => $fastcgi_param,
fastcgi_params => $fastcgi_params,
fastcgi_script => $fastcgi_script,
uwsgi => $uwsgi,
Expand Down
8 changes: 8 additions & 0 deletions spec/defines/resource_vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,14 @@
it { is_expected.to contain_file('/etc/nginx/fastcgi_params').with_mode('0770') }
end

context 'when fastcgi_param => {key => value}' do
let :params do
default_params.merge(fastcgi_param: { 'key' => 'value' })
end

it { is_expected.to contain_nginx__resource__location("#{title}-default").with_fastcgi_param('key' => 'value') }
end

context 'when uwsgi => "uwsgi_upstream"' do
let :params do
default_params.merge(uwsgi: 'uwsgi_upstream')
Expand Down

0 comments on commit 5aaf21c

Please sign in to comment.