File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 628628 # - $proxy_pass_match
629629 # - $proxy_preserve_host
630630 # - $no_proxy_uris
631- if $proxy_dest or $proxy_pass or $proxy_pass_match {
631+ if $proxy_dest or $proxy_pass or $proxy_pass_match or $proxy_dest_match {
632632 concat::fragment { "${name}-proxy" :
633633 target => " ${priority_real}${filename} .conf" ,
634634 order => 140,
Original file line number Diff line number Diff line change 414414 it { is_expected . to contain_concat__fragment ( 'rspec.example.com-charsets' ) }
415415 it { is_expected . to contain_concat__fragment ( 'rspec.example.com-file_footer' ) }
416416 end
417+ context 'proxy_pass_match' do
418+ let :params do
419+ {
420+ 'docroot' => '/rspec/docroot' ,
421+ 'proxy_pass_match' => [
422+ {
423+ 'path' => '.*' ,
424+ 'url' => 'http://backend-a/' ,
425+ }
426+ ] ,
427+ }
428+ end
429+ it { is_expected . to contain_concat__fragment ( 'rspec.example.com-proxy' ) . with_content (
430+ /ProxyPassMatch .* http:\/ \/ backend-a\/ / ) . with_content ( /## Proxy rules/ ) }
431+ end
432+ context 'proxy_dest_match' do
433+ let :params do
434+ {
435+ 'docroot' => '/rspec/docroot' ,
436+ 'proxy_dest_match' => '/'
437+ }
438+ end
439+ it { is_expected . to contain_concat__fragment ( 'rspec.example.com-proxy' ) . with_content ( /## Proxy rules/ ) }
440+ end
417441 context 'not everything can be set together...' do
418442 let :params do
419443 {
Original file line number Diff line number Diff line change 1- <% if @proxy_dest or @proxy_pass -%>
1+ <% if @proxy_dest or @proxy_pass or @proxy_pass_match or @proxy_dest_match -%>
22
33 ## Proxy rules
44 ProxyRequests Off
You can’t perform that action at this time.
0 commit comments