diff --git a/templates/miq-template-ext-db.yaml b/templates/miq-template-ext-db.yaml index 9723813c..e1f20964 100644 --- a/templates/miq-template-ext-db.yaml +++ b/templates/miq-template-ext-db.yaml @@ -443,8 +443,11 @@ objects: ServerName https://%{REQUEST_HOST} ProxyPreserveHost on - ProxyPass /ws/ ws://${NAME}/ws/ - ProxyPassReverse /ws/ ws://${NAME}/ws/ + + RewriteCond %{REQUEST_URI} ^/ws [NC] + RewriteCond %{HTTP:UPGRADE} ^websocket$ [NC] + RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] + RewriteRule .* ws://${NAME}%{REQUEST_URI} [P,QSA,L] # For httpd, some ErrorDocuments must by served by the httpd pod RewriteCond %{REQUEST_URI} !^/proxy_pages diff --git a/templates/miq-template.yaml b/templates/miq-template.yaml index 78624fca..d0d2996d 100644 --- a/templates/miq-template.yaml +++ b/templates/miq-template.yaml @@ -133,8 +133,11 @@ objects: ServerName https://%{REQUEST_HOST} ProxyPreserveHost on - ProxyPass /ws/ ws://${NAME}/ws/ - ProxyPassReverse /ws/ ws://${NAME}/ws/ + + RewriteCond %{REQUEST_URI} ^/ws [NC] + RewriteCond %{HTTP:UPGRADE} ^websocket$ [NC] + RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] + RewriteRule .* ws://${NAME}%{REQUEST_URI} [P,QSA,L] # For httpd, some ErrorDocuments must by served by the httpd pod RewriteCond %{REQUEST_URI} !^/proxy_pages