fix: skip custom domain store detection for platform domains
Some checks failed
CI / ruff (push) Successful in 12s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled

StoreContextMiddleware was treating platform domains (e.g. rewardflow.lu)
as custom store domains, causing store lookup to fail before reaching
path-based detection (/storefront/FASHIONHUB/...). Now skips custom
domain detection when the host matches the platform's own domain.

Also fixes menu tests to use loyalty-program instead of loyalty-overview,
and adds LOYALTY_DEFAULT_LOGO_URL and LOYALTY_GOOGLE_WALLET_ORIGINS to
Hetzner deployment docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 23:06:49 +01:00
parent 694a1cd1a5
commit 5dd5e01dc6
4 changed files with 22 additions and 9 deletions

View File

@@ -278,7 +278,7 @@ class TestMerchantMenuModuleGating:
s for s in data["sections"] if s["id"] == platform_section_id
)
item_ids = {i["id"] for i in platform_section["items"]}
assert "loyalty-overview" in item_ids
assert "loyalty-program" in item_ids
def test_loyalty_hidden_when_module_not_enabled(
self, client, db, menu_auth, menu_merchant, menu_subscription,
@@ -296,7 +296,7 @@ class TestMerchantMenuModuleGating:
self, client, db, menu_auth, menu_merchant, menu_subscription,
menu_loyalty_module, menu_platform,
):
"""Loyalty overview item has the correct URL."""
"""Loyalty program item has the correct URL."""
response = client.get(BASE, headers=menu_auth)
data = response.json()
platform_section_id = f"platform-{menu_platform.code}"
@@ -304,9 +304,9 @@ class TestMerchantMenuModuleGating:
s for s in data["sections"] if s["id"] == platform_section_id
)
overview = next(
i for i in platform_section["items"] if i["id"] == "loyalty-overview"
i for i in platform_section["items"] if i["id"] == "loyalty-program"
)
assert overview["url"] == "/merchants/loyalty/overview"
assert overview["url"] == "/merchants/loyalty/program"
@pytest.mark.integration
@@ -498,7 +498,7 @@ class TestMerchantMenuMultiPlatform:
s for s in data["sections"] if s["id"] == platform_a_section_id
)
item_ids = {i["id"] for i in pa_section["items"]}
assert "loyalty-overview" in item_ids
assert "loyalty-program" in item_ids
# Core sections always present
assert "main" in section_ids
assert "billing" in section_ids