From 6271a1a387ed940f51dc663dd9aad24be9732fbf Mon Sep 17 00:00:00 2001
From: klewis0928 <54325928+klewis0928@users.noreply.github.com>
Date: Fri, 25 Oct 2024 11:59:56 -0400
Subject: [PATCH] Add upgrade rule (#8733)
* Add upgrade rule
* Update ssl.conf
* Update ssl.conf
---
.../osp-on-ocp/templates/httpd/ssl.conf | 30 ++++++++++++-------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/ansible/configs/osp-on-ocp/templates/httpd/ssl.conf b/ansible/configs/osp-on-ocp/templates/httpd/ssl.conf
index bedb229ba16..38800ff623f 100644
--- a/ansible/configs/osp-on-ocp/templates/httpd/ssl.conf
+++ b/ansible/configs/osp-on-ocp/templates/httpd/ssl.conf
@@ -69,26 +69,36 @@ Header edit Location "apps.ocp.example.com/auth/callback" "apps.{{ guid }}.{{ cl
ServerAlias *.apps.{{ guid }}.{{ cluster_dns_zone }}
-ErrorLog logs/ssl_apps_error_log
-TransferLog logs/ssl_app_access_log
-LogLevel warn
+ErrorLog logs/ssl_nova_error_log
+TransferLog logs/ssl_nova_access_log
+LogLevel debug
SSLEngine on
SSLHonorCipherOrder on
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM
SSLCertificateFile /root/certbot/config/live/api.{{ guid }}.{{ cluster_dns_zone }}/fullchain.pem
SSLCertificateKeyFile /root/certbot/config/live/api.{{ guid }}.{{ cluster_dns_zone }}/privkey.pem
-#RequestHeader set Referer "https://zzzzz.apps.ocp.example.com"
-#RequestHeader set Origin "https://zzzzz.apps.ocp.example.com"
+
+ProxyRequests off
+ProxyVia on
ProxyPreserveHost On
+ProxyTimeout 300
+
+ProxyPass / https://nova-novncproxy-cell1-public-openstack.apps.ocp.example.com/
+ProxyPassReverse / https://nova-novncproxy-cell1-public-openstack.apps.ocp.example.com/
+
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
-ProxyPass "/" "https://zzzzz.apps.ocp.example.com/" max=20 ttl=120 retry=300
-ProxyPassReverse "/" "https://zzzzz.apps.ocp.example.com/"
+RewriteEngine On
+RewriteCond %{HTTP:Connection} upgrade [NC]
+RewriteCond %{HTTP:Upgrade} websocket [NC]
+RewriteRule /(.*) wss://nova-novncproxy-cell1-public-openstack.apps.ocp.example.com/$1 [P,L]
+
+AddOutputFilterByType SUBSTITUTE text/javascript
+Substitute "s|apps.ocp.example.com|apps.6s9zw.dynamic.redhatworkshops.io|i"
-AddOutputFilterByType SUBSTITUTE text/html
-#Substitute "s|apps.ocp.example.com|apps.{{ guid }}.{{ cluster_dns_zone }}|i"
-Header edit Location "oauth-openshift.apps.ocp.example.com" "oauth-openshift.apps.{{ guid }}.{{ cluster_dns_zone }}"
+
+