Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/frontend/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
/pt-br/widget /_shell.html 200

# Gold lives as plain files under dist/client/gold/ (see netlify.toml), so /gold/ needs no rule.
# The locale-first alias mirrors /pt-BR/widget; Gold's canonical link still points at /gold/.
/pt-BR/gold /gold/index.html 200
/pt-BR/gold/* /gold/:splat 200
/pt-br/gold /gold/index.html 200
/pt-br/gold/* /gold/:splat 200

# Everything else is a real 404
/* /404.html 404
Expand Down
6 changes: 4 additions & 2 deletions apps/frontend/src/tests/netlify-redirects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ const redirects = readFileSync(new URL("../../_redirects", import.meta.url), "ut
});

describe("Netlify redirects", () => {
it("routes only the lowercase Portuguese widget path through the SPA shell", () => {
it("routes only the widget shell and the gold alias through lowercase Portuguese paths", () => {
expect(redirects.filter(rule => rule.from.startsWith("/pt-br"))).toEqual([
{ from: "/pt-br/widget", status: "200", to: "/_shell.html" }
{ from: "/pt-br/widget", status: "200", to: "/_shell.html" },
{ from: "/pt-br/gold", status: "200", to: "/gold/index.html" },
{ from: "/pt-br/gold/*", status: "200", to: "/gold/:splat" }
]);
});

Expand Down
4 changes: 2 additions & 2 deletions apps/gold/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ imported as a snapshot from `pendulum-chain/vortexperiments`, which keeps the pi

- It is served by the frontend Netlify site at `https://www.vortexfinance.co/gold/`:
`apps/frontend/netlify.toml` builds it with Vite `base: "/gold/"` and copies `dist/client`
into the frontend's `dist/client/gold/`, so no redirect rule exists. Like `/widget`, the
path is unprefixed; locale-prefixed variants can be added if other markets launch.
into the frontend's `dist/client/gold/`. Like `/widget`, the canonical path is unprefixed
and `/pt-BR/gold` is a rewrite alias in `apps/frontend/_redirects`.
Reference public assets through `import.meta.env.BASE_URL`, never as root-relative
`/brand/...` paths.
- The API base comes from `VITE_SIGNING_SERVICE_PATH`, like the frontend: a path such as
Expand Down
Loading