From 0c72e68ef3cb5d5643e5bf1536f913b8a2b63e77 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-196: SENAITE HTTP requests rewritten to use SSL (in Gitpod only) --- proxy/default.conf.template | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/proxy/default.conf.template b/proxy/default.conf.template index c77edf9..f5258e5 100644 --- a/proxy/default.conf.template +++ b/proxy/default.conf.template @@ -169,7 +169,18 @@ 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; 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; + proxy_pass http://senaite; + } +}