Enable SSL proxy middleware configuration
HTTPProxyToWSGI, from oslo.middleware requires a configuration parameter to be enabled/disabled. This adds it. Change-Id: I35256153b2f005e729be9d242f63ff14f393b54a
This commit is contained in:
parent
869f0c61a9
commit
a868b0b578
@ -12,11 +12,18 @@
|
||||
# (integer value)
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*enable_proxy_headers_parsing*]
|
||||
# (Optional) Enables SSL request handling from HTTPProxyToWSGI middleware.
|
||||
# (boolean value)
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
define oslo::middleware(
|
||||
$max_request_body_size = $::os_service_default,
|
||||
$max_request_body_size = $::os_service_default,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
) {
|
||||
$middleware_options = {
|
||||
'oslo_middleware/max_request_body_size' => { value => $max_request_body_size }
|
||||
'oslo_middleware/max_request_body_size' => { value => $max_request_body_size },
|
||||
'oslo_middleware/enable_proxy_headers_parsing' => { value => $enable_proxy_headers_parsing },
|
||||
}
|
||||
create_resources($name, $middleware_options)
|
||||
}
|
||||
|
@ -9,17 +9,21 @@ describe 'oslo::middleware' do
|
||||
context 'with default parameters' do
|
||||
it 'configure oslo_middleware default params' do
|
||||
is_expected.to contain_keystone_config('oslo_middleware/max_request_body_size').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_keystone_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with overridden parameters' do
|
||||
let :params do
|
||||
{ :max_request_body_size => 114600,
|
||||
{
|
||||
:max_request_body_size => 114600,
|
||||
:enable_proxy_headers_parsing => true,
|
||||
}
|
||||
end
|
||||
it 'configure oslo_middleware with overriden values' do
|
||||
is_expected.to contain_keystone_config('oslo_middleware/max_request_body_size').with_value(114600)
|
||||
is_expected.to contain_keystone_config('oslo_middleware/enable_proxy_headers_parsing').with_value(true)
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user