From 26d5113d54789fa69a54e030ca5658465a6e90c7 Mon Sep 17 00:00:00 2001 From: Ruhanga <41738040+Ruhanga@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:20:48 +0300 Subject: [PATCH] OZ-457: SENAITE HTTP requests rewritten to use SSL (in Gitpod only) --- proxy/default.conf.template | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/proxy/default.conf.template b/proxy/default.conf.template index 5aa03df..ecaa7ea 100644 --- a/proxy/default.conf.template +++ b/proxy/default.conf.template @@ -157,8 +157,20 @@ server { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - rewrite ^(.*)$ /VirtualHostBase/$scheme/$host/senaite/VirtualHostRoot/$1 break; + rewrite ^(.*)$ /VirtualHostBase/https/$host/senaite/VirtualHostRoot/$1 break; set $senaite senaite:8080; proxy_pass http://$senaite; } -} \ No newline at end of file +} + +server { + listen 8081; + location / { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + rewrite ^(.*)$ /VirtualHostBase/http/$host/senaite/VirtualHostRoot/$1 break; + set $senaite senaite:8080; + proxy_pass http://$senaite; + } +}