From 18d0bdc2b23a15c13659dfbbc6e54c78f86e4d07 Mon Sep 17 00:00:00 2001 From: YannickEvers <112076936+YannickEvers@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:50:30 +0200 Subject: [PATCH] OPS-6565-replace-subdomain (#102) * Merge locations, replace subdomains in both cases --- roles/bettermarks_proxy/templates/apps.conf.j2 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/roles/bettermarks_proxy/templates/apps.conf.j2 b/roles/bettermarks_proxy/templates/apps.conf.j2 index 907ab96..7e13f2d 100644 --- a/roles/bettermarks_proxy/templates/apps.conf.j2 +++ b/roles/bettermarks_proxy/templates/apps.conf.j2 @@ -1,21 +1,5 @@ server{ listen 8080; - location /services.json { - proxy_hide_header 'Access-Control-Allow-Origin'; - add_header 'Access-Control-Allow-Origin' $http_origin; - # Proxy to the origin - proxy_set_header {{ proxy_identification_header }} true; - proxy_pass https://{{ bettermarks_subdomain }}.{{ bettermarks_domain }}; - proxy_ssl_server_name on; - proxy_intercept_errors off; - # Turn off gzip so that we can perform regex replacement - proxy_set_header Accept-Encoding ""; - # Replace bettermarks apps domain with proxy host - sub_filter {{ bettermarks_subdomain }}.{{ bettermarks_domain }} {{ proxy_subdomain }}.{{ bettermarks_proxy_maindomain }}; - sub_filter .{{ bettermarks_domain }} .{{ bettermarks_proxy_maindomain }}; - sub_filter_once off; - sub_filter_types application/json; - } location / { proxy_hide_header 'Access-Control-Allow-Origin'; add_header 'Access-Control-Allow-Origin' $http_origin;