From 8eb03d106ebf21f103e4f87360c57d0192e995a0 Mon Sep 17 00:00:00 2001 From: archipelago Date: Thu, 21 May 2026 00:30:22 -0400 Subject: [PATCH] fix(apps): repair saleor storefront graphql origin --- CHANGELOG.md | 6 ++++++ core/archipelago/src/api/rpc/package/stacks.rs | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b9d040b..afa25e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`. diff --git a/core/archipelago/src/api/rpc/package/stacks.rs b/core/archipelago/src/api/rpc/package/stacks.rs index c709b35c..26a4ba61 100644 --- a/core/archipelago/src/api/rpc/package/stacks.rs +++ b/core/archipelago/src/api/rpc/package/stacks.rs @@ -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/'; } } "#;