Skip to content

Commit

Permalink
DCB-191 - fixing routing to platform
Browse files Browse the repository at this point in the history
(cherry picked from commit c4e6fc36517418440174652459fff719cda94b78)
  • Loading branch information
dmatusiewicz authored and lukasz-andrzejak committed Oct 13, 2023
1 parent 141305e commit 329e2a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions appstore-caching-service-nginx/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 329e2a4

Please sign in to comment.