From ef2184c9a734b5ec7ff2513a135af38bb7ad149c Mon Sep 17 00:00:00 2001 From: Vahid Ahmadi Date: Fri, 5 Jun 2026 12:44:26 +0100 Subject: [PATCH] Proxy UK Python and API docs through the website host Add /uk/python and /uk/api rewrites to website/next.config.ts, mirroring the existing /us/* proxies to the household-api-docs deployment. The upstream deployment already serves the UK pages (verified 200 with correct policyengine-uk content); only the host proxy was missing, so the country-parameterized "Python" and "API" nav links 404'd on UK pages. Now they resolve. Co-Authored-By: Claude Opus 4.8 (1M context) --- changelog_entry.yaml | 2 ++ website/next.config.ts | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index dc4348af3..ae7eaebae 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -3,3 +3,5 @@ added: - Add UK Universal Credit rebalancing analysis dashboard at /uk/uc-rebalancing - Add UK fuel duty rise cancellation analysis dashboard at /uk/cancelling-fuel-duty-rise + changed: + - Proxy UK Python package docs at /uk/python and UK API docs at /uk/api so the country-parameterized "Python" and "API" nav links work on UK pages diff --git a/website/next.config.ts b/website/next.config.ts index 97cdb99b4..9ed6f4c55 100644 --- a/website/next.config.ts +++ b/website/next.config.ts @@ -137,6 +137,16 @@ const nextConfig: NextConfig = { destination: "https://household-api-docs-policy-engine.vercel.app/us/api/:path*", }, + { + source: "/uk/api", + destination: + "https://household-api-docs-policy-engine.vercel.app/uk/api/", + }, + { + source: "/uk/api/:path*", + destination: + "https://household-api-docs-policy-engine.vercel.app/uk/api/:path*", + }, // Python client docs — same household-api-docs deployment, served at top-level /us/python { source: "/us/python", @@ -148,6 +158,16 @@ const nextConfig: NextConfig = { destination: "https://household-api-docs-policy-engine.vercel.app/us/python/:path*", }, + { + source: "/uk/python", + destination: + "https://household-api-docs-policy-engine.vercel.app/uk/python", + }, + { + source: "/uk/python/:path*", + destination: + "https://household-api-docs-policy-engine.vercel.app/uk/python/:path*", + }, // Zone asset proxy — API docs uses assetPrefix: '/_zones/household-api-docs' { source: "/_zones/household-api-docs/:path*",