fix(apps): repair saleor storefront graphql origin

This commit is contained in:
archipelago 2026-05-21 00:30:22 -04:00
parent 4da6e3b43c
commit 8eb03d106e
2 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## v1.7.80-alpha (2026-05-21)
- Saleor storefront proxying now falls back to the direct request scheme when no forwarded protocol header is present, fixing direct `http://node:9011` launches that could generate an invalid same-origin GraphQL URL.
- The Saleor storefront release path keeps public proxy support intact by still honoring forwarded HTTPS headers for Nginx Proxy Manager domains while repairing local/direct port launches.
- Validation passed with `cargo fmt --check` and `cargo check` for the Archipelago backend before release staging.
## v1.7.79-alpha (2026-05-20)
- Saleor now installs the official Saleor Storefront as part of the stack, built from the pinned `saleor/storefront` source and served as the customer-facing shop on port `9011`.

View File

@ -273,7 +273,6 @@ async fn repair_saleor_network_aliases() {
.output()
.await;
}
}
async fn run_required_stack_command(
@ -2096,8 +2095,7 @@ user.save()
"NEXT_PUBLIC_DEFAULT_CHANNEL=default-channel",
SALEOR_STOREFRONT_CONTEXT,
]);
run_required_stack_command("saleor", "build storefront", &mut storefront_build_cmd)
.await?;
run_required_stack_command("saleor", "build storefront", &mut storefront_build_cmd).await?;
let mut storefront_cmd = tokio::process::Command::new("podman");
storefront_cmd.args([
@ -2236,7 +2234,12 @@ async fn write_saleor_storefront_proxy_config() -> Result<()> {
.await
.context("Failed to create Saleor storefront config directory")?;
let nginx_conf = r#"server {
let nginx_conf = r#"map $http_x_forwarded_proto $saleor_storefront_proto {
default $http_x_forwarded_proto;
"" $scheme;
}
server {
listen 80;
server_name _;
@ -2259,7 +2262,7 @@ async fn write_saleor_storefront_proxy_config() -> Result<()> {
proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter_types text/html application/javascript text/javascript;
sub_filter 'http://api:8000/graphql/' '$http_x_forwarded_proto://$host/graphql/';
sub_filter 'http://api:8000/graphql/' '$saleor_storefront_proto://$host/graphql/';
}
}
"#;