diff --git a/spec/classes/plugin/remote_execution_cockpit_spec.rb b/spec/classes/plugin/remote_execution_cockpit_spec.rb index 4913e6d0..f5fc779d 100644 --- a/spec/classes/plugin/remote_execution_cockpit_spec.rb +++ b/spec/classes/plugin/remote_execution_cockpit_spec.rb @@ -70,8 +70,8 @@ class {'foreman': is_expected.to contain_foreman__config__apache__fragment('cockpit') .without_content .with_ssl_content(%r{^$}) - .with_ssl_content(%r{^ RewriteRule /webcon/\(\.\*\) ws://127\.0\.0\.1:19090/webcon/\$1 \[P\]$}) - .with_ssl_content(%r{^ RewriteRule /webcon/\(\.\*\) http://127\.0\.0\.1:19090/webcon/\$1 \[P\]$}) + .with_ssl_content(%r{^ RewriteRule /webcon/\(\.\*\) ws://127\.0\.0\.1:19090/webcon/\$1 \[P,UnsafeAllow3F\]$}) + .with_ssl_content(%r{^ RewriteRule /webcon/\(\.\*\) http://127\.0\.0\.1:19090/webcon/\$1 \[P,UnsafeAllow3F\]$}) end end diff --git a/templates/cockpit-apache-ssl.conf.erb b/templates/cockpit-apache-ssl.conf.erb index 91fe9cad..dcbc0497 100644 --- a/templates/cockpit-apache-ssl.conf.erb +++ b/templates/cockpit-apache-ssl.conf.erb @@ -5,7 +5,7 @@ RewriteEngine On RewriteCond %{HTTP:Upgrade} =websocket [NC] - RewriteRule <%= @cockpit_path %>/(.*) ws://<%= @cockpit_host %>:<%= @cockpit_port %><%= @cockpit_path %>/$1 [P] + RewriteRule <%= @cockpit_path %>/(.*) ws://<%= @cockpit_host %>:<%= @cockpit_port %><%= @cockpit_path %>/$1 [P,UnsafeAllow3F] RewriteCond %{HTTP:Upgrade} !=websocket [NC] - RewriteRule <%= @cockpit_path %>/(.*) http://<%= @cockpit_host %>:<%= @cockpit_port %><%= @cockpit_path %>/$1 [P] + RewriteRule <%= @cockpit_path %>/(.*) http://<%= @cockpit_host %>:<%= @cockpit_port %><%= @cockpit_path %>/$1 [P,UnsafeAllow3F]