Skip to content

Commit

Permalink
OPS-6565-replace-subdomain (#102)
Browse files Browse the repository at this point in the history
* Merge locations, replace subdomains in both cases
  • Loading branch information
YannickEvers authored Jun 10, 2024
1 parent 1245de7 commit 18d0bdc
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions roles/bettermarks_proxy/templates/apps.conf.j2
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 18d0bdc

Please sign in to comment.