From 2b361a83a8e8c09ba1be2036c7c9cdc4fe46054b Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 13 Jun 2026 23:49:05 -0500 Subject: [PATCH] fix(ifta): 'I already filed' link must use the API host, not the site host The handler is an API route; performancewest.net/api/* proxies to the Astro site (:4322), only api.performancewest.net serves the API. Build the filed link from PUBLIC_API_URL (default https://api.performancewest.net). Verified end-to-end: valid token -> 200 confirmation page, invalid -> 403. --- scripts/build_ifta_quarterly_campaign.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build_ifta_quarterly_campaign.py b/scripts/build_ifta_quarterly_campaign.py index f67a8ec..fcaff4c 100644 --- a/scripts/build_ifta_quarterly_campaign.py +++ b/scripts/build_ifta_quarterly_campaign.py @@ -176,7 +176,10 @@ def _ifta_filed_token(dot: str) -> str: def _filed_link(dot: str) -> str: - return f"{tc.SITE_DOMAIN}/api/v1/ifta/filed?dot={dot}&t={_ifta_filed_token(dot)}" + # The "I already filed" handler is an API route, so it must hit the API host + # (api.performancewest.net), NOT the Astro site host (performancewest.net). + api_base = os.getenv("PUBLIC_API_URL", "https://api.performancewest.net").rstrip("/") + return f"{api_base}/api/v1/ifta/filed?dot={dot}&t={_ifta_filed_token(dot)}" def main() -> int: