From 318e8f7f35a5b2b38ec8f19841ea37801c1820dc Mon Sep 17 00:00:00 2001 From: Antun Franjin Date: Tue, 25 Jan 2022 01:17:08 +0100 Subject: [PATCH] Add storage path to nginx proxy pas to rm backend. - The /storage/ path is call view to get media from minio storage so we need to proxy pass path to backend. --- 01_onsite/02_qa/rm/deployment.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/01_onsite/02_qa/rm/deployment.yaml b/01_onsite/02_qa/rm/deployment.yaml index 2114820..8d860a3 100644 --- a/01_onsite/02_qa/rm/deployment.yaml +++ b/01_onsite/02_qa/rm/deployment.yaml @@ -137,7 +137,7 @@ data: minio_endpoint = minio-api-dev.semapp.lan minio_use_https = False minio_media_bucket = rm-qa - minio_access_key = rm-qa + minio_access_key = rm-qa minio_secret_key = rm-qa123456! minio_auto_create_bucket = True --- @@ -181,8 +181,12 @@ data: } location /storage { - # TODO: still needed when we use minio? - alias /srv/media; + proxy_pass http://backend; + proxy_redirect off; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /static {