set url_base option in staticweb swift middleware
the url_base option was recently added upstream to resolve issue with SSL termination by haproxy. Closes-Bug: 1638632 Change-Id: Icf45cf2aece398b836c87ddffde5d3056e96dc4d Signed-off-by: Thiago da Silva <thiago@redhat.com>
This commit is contained in:
@@ -8,6 +8,12 @@
|
|||||||
#
|
#
|
||||||
# include 'swift::proxy::staticweb'
|
# include 'swift::proxy::staticweb'
|
||||||
#
|
#
|
||||||
|
# == Parameters
|
||||||
|
#
|
||||||
|
# [*url_base*]
|
||||||
|
# (optional) The URL scheme and/or the host name used to generate redirects.
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# == Authors
|
# == Authors
|
||||||
#
|
#
|
||||||
# Mehdi Abaakouk <sileht@sileht.net>
|
# Mehdi Abaakouk <sileht@sileht.net>
|
||||||
@@ -16,11 +22,14 @@
|
|||||||
#
|
#
|
||||||
# Copyright 2012 eNovance licensing@enovance.com
|
# Copyright 2012 eNovance licensing@enovance.com
|
||||||
#
|
#
|
||||||
class swift::proxy::staticweb() {
|
class swift::proxy::staticweb(
|
||||||
|
$url_base = $::os_service_default
|
||||||
|
) {
|
||||||
|
|
||||||
include ::swift::deps
|
include ::swift::deps
|
||||||
|
|
||||||
swift_proxy_config {
|
swift_proxy_config {
|
||||||
'filter:staticweb/use': value => 'egg:swift#staticweb';
|
'filter:staticweb/use': value => 'egg:swift#staticweb';
|
||||||
|
'filter:staticweb/url_base': value => $url_base;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,4 +8,13 @@ describe 'swift::proxy::staticweb' do
|
|||||||
|
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:staticweb/use').with_value('egg:swift#staticweb') }
|
it { is_expected.to contain_swift_proxy_config('filter:staticweb/use').with_value('egg:swift#staticweb') }
|
||||||
|
|
||||||
|
describe "when overriding default parameters" do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:url_base => 'https://www.example.com',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:staticweb/url_base').with_value('https://www.example.com') }
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user