From e1d512e5fd1b2893fb3d729aed7d6e2b38623c42 Mon Sep 17 00:00:00 2001 From: salfers <97662717+salfers@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:53:44 +0100 Subject: [PATCH] Set CORS headers for both http/https in SSVM apache config (#9389) --- systemvm/debian/etc/apache2/vhost.template | 8 +++---- systemvm/debian/opt/cloud/bin/setup/common.sh | 3 --- .../debian/opt/cloud/bin/setup/secstorage.sh | 23 ++----------------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/systemvm/debian/etc/apache2/vhost.template b/systemvm/debian/etc/apache2/vhost.template index 7f6a5146099..d1c7a2960ee 100644 --- a/systemvm/debian/etc/apache2/vhost.template +++ b/systemvm/debian/etc/apache2/vhost.template @@ -39,8 +39,8 @@ Allow from 127.0.0.0/255.0.0.0 ::1/128 - # Include HTTP configuration **IF SET** - IncludeOptional /etc/apache2/http.conf + # Include CORS configuration **IF SET** + IncludeOptional /etc/apache2/cors.conf @@ -86,8 +86,8 @@ Allow from 127.0.0.0/255.0.0.0 ::1/128 - # Include HTTPS configuration **IF SET** - IncludeOptional /etc/apache2/https.conf + # Include CORS configuration **IF SET** + IncludeOptional /etc/apache2/cors.conf # SSL Engine Switch: # Enable/Disable SSL for this virtual host. diff --git a/systemvm/debian/opt/cloud/bin/setup/common.sh b/systemvm/debian/opt/cloud/bin/setup/common.sh index 85b78ee16ae..ef1576ab588 100755 --- a/systemvm/debian/opt/cloud/bin/setup/common.sh +++ b/systemvm/debian/opt/cloud/bin/setup/common.sh @@ -924,9 +924,6 @@ parse_cmd_line() { privateMtu) export PRIVATEMTU=$VALUE ;; - useHttpsToUpload) - export USEHTTPS=$VALUE - ;; vncport) export VNCPORT=$VALUE ;; diff --git a/systemvm/debian/opt/cloud/bin/setup/secstorage.sh b/systemvm/debian/opt/cloud/bin/setup/secstorage.sh index b8ed7b54311..5baed567f8f 100755 --- a/systemvm/debian/opt/cloud/bin/setup/secstorage.sh +++ b/systemvm/debian/opt/cloud/bin/setup/secstorage.sh @@ -50,33 +50,14 @@ setup_secstorage() { a2enmod proxy_http a2enmod headers - if [ -z $USEHTTPS ] | $USEHTTPS ; then - if [ -f /etc/apache2/http.conf ]; then - rm -rf /etc/apache2/http.conf - fi - cat >/etc/apache2/https.conf </etc/apache2/http.conf </etc/apache2/cors.conf <