From 329e2a4b198e48c9b013c7a3df8f97a648964a9c Mon Sep 17 00:00:00 2001 From: Dawid Matusiewicz Date: Fri, 22 Sep 2023 11:46:15 +0200 Subject: [PATCH] DCB-191 - fixing routing to platform (cherry picked from commit c4e6fc36517418440174652459fff719cda94b78) --- appstore-caching-service-nginx/default.conf.template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/appstore-caching-service-nginx/default.conf.template b/appstore-caching-service-nginx/default.conf.template index f56a503..b67451f 100644 --- a/appstore-caching-service-nginx/default.conf.template +++ b/appstore-caching-service-nginx/default.conf.template @@ -21,6 +21,10 @@ upstream asbs-backend { server ${ASBS_SERVICE}; } +upstream asbm-backend { + server ${ASBM_SERVICE}; +} + map $http_x_request_id $reqid { default $http_x_request_id; "" $request_id; @@ -43,7 +47,7 @@ server { alias /etc/nginx/appstore-caching-service.yaml; } - location /bundles { + location ~ ^/(platforms|bundles) { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; @@ -79,7 +83,7 @@ server { add_header 'Access-Control-Allow-Credentials' true always; add_header 'Access-Control-Allow-Origin' '*' always; - proxy_pass http://${ASBM_SERVICE}; + proxy_pass http://asbm-backend; } location @backend {