From d02f3a4f15c7a112aefb6fd299d26a5675c647d2 Mon Sep 17 00:00:00 2001 From: Luke Short Date: Tue, 18 Aug 2020 13:50:31 -0400 Subject: [PATCH] Expose vhost_custom_fragment It is provided by the Puppet class 'openstacklib::wsgi::apache'. This change exposes it for the Heat CFN service. Change-Id: If689eb5e896dba443358ac83cd7f566aacc276f1 Signed-off-by: Luke Short (cherry picked from commit 0e85f1c7b0d7c8819aedeb83da10eea4633d2e25) (cherry picked from commit 8b91724b4004d8e975ee0acbcdedf957ceb0421b) --- manifests/wsgi/apache_api_cfn.pp | 10 ++++++++-- spec/classes/heat_wsgi_apache_api_cfn_spec.rb | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/manifests/wsgi/apache_api_cfn.pp b/manifests/wsgi/apache_api_cfn.pp index f8f64e17..8cc94413 100644 --- a/manifests/wsgi/apache_api_cfn.pp +++ b/manifests/wsgi/apache_api_cfn.pp @@ -85,6 +85,11 @@ # (optional) Name of the WSGI process display-name. # Defaults to undef # +# [*vhost_custom_fragment*] +# (optional) Passes a string of custom configuration +# directives to be placed at the end of the vhost configuration. +# Default: 'RequestHeader set Content-Type "application/json"' +# # == Dependencies # # requires Class['apache'] & Class['heat'] @@ -116,6 +121,8 @@ class heat::wsgi::apache_api_cfn ( $error_log_file = undef, $custom_wsgi_process_options = {}, $wsgi_process_display_name = undef, + # Enforce content-type, see https://bugs.launchpad.net/tripleo/+bug/1641589 + $vhost_custom_fragment = 'RequestHeader set Content-Type "application/json"', ) { # See custom fragment below @@ -149,8 +156,7 @@ class heat::wsgi::apache_api_cfn ( ssl_certs_dir => $ssl_certs_dir, threads => $threads, priority => $priority, - # Enforce content-type, see https://bugs.launchpad.net/tripleo/+bug/1641589 - vhost_custom_fragment => 'RequestHeader set Content-Type "application/json"', + vhost_custom_fragment => $vhost_custom_fragment, custom_wsgi_process_options => $custom_wsgi_process_options, access_log_file => $access_log_file, access_log_format => $access_log_format, diff --git a/spec/classes/heat_wsgi_apache_api_cfn_spec.rb b/spec/classes/heat_wsgi_apache_api_cfn_spec.rb index 4f0cc36b..beaa1733 100644 --- a/spec/classes/heat_wsgi_apache_api_cfn_spec.rb +++ b/spec/classes/heat_wsgi_apache_api_cfn_spec.rb @@ -23,7 +23,8 @@ describe 'heat::wsgi::apache_api_cfn' do :priority => 10, :custom_wsgi_process_options => {}, :access_log_file => false, - :access_log_format => false,) + :access_log_format => false, + :vhost_custom_fragment => 'RequestHeader set Content-Type "application/json"',) } end end