app-platform: remove unsupported saleor release surface

This commit is contained in:
archipelago
2026-06-11 01:16:21 -04:00
parent de60f7e21e
commit f818f1dcc1
16 changed files with 122 additions and 217 deletions
+2 -32
View File
@@ -62,38 +62,8 @@ for row in rows:
forward_port = int(port)
except (TypeError, ValueError):
forward_port = None
is_saleor_dashboard = forward_port == 9010
is_saleor_storefront = forward_port == 9011
is_saleor = is_saleor_dashboard or is_saleor_storefront
graphql_location = ""
saleor_proxy_headers = ""
if is_saleor:
graphql_location = """
location ^~ /graphql/ {
proxy_pass http://127.0.0.1:8000/graphql/;
proxy_http_version 1.1;
proxy_set_header Host 127.0.0.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Scheme https;
proxy_set_header Origin "";
}
"""
if is_saleor_storefront:
saleor_proxy_headers = """
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter_types text/html application/javascript text/javascript;
sub_filter 'http://api:8000/graphql/' 'https://$host/graphql/';
"""
if is_saleor_dashboard:
saleor_proxy_headers = """
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter_types text/html;
sub_filter '</head>' '<script>if(window.__SALEOR_CONFIG__){window.__SALEOR_CONFIG__.API_URL=location.origin+"/graphql/";window.__SALEOR_CONFIG__.EXTENSIONS_API_URL=location.origin+"/graphql/";}</script></head>';
"""
extra_proxy_headers = ""
print(f"""
server {{
@@ -129,7 +99,7 @@ server {{
proxy_set_header X-Forwarded-Scheme https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
{saleor_proxy_headers}
{extra_proxy_headers}
}}
}}
""")