Proxy GraphQL through a slug-based env host

Hardcoding the trust-center origin broke local portal
development. Read COMPLIANCE_PORTAL_PROXY_TARGET so each
slug can point Vite's /graphql proxy at the right HTTPS host.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-21 18:19:14 +02:00
parent 87033df505
commit 48c7585797
2 changed files with 63 additions and 42 deletions

View File

@@ -1 +1,5 @@
VITE_API_URL=http://localhost:8080
# Browser hits the Vite origin; /graphql is proxied (see vite.config.ts).
VITE_API_URL=http://localhost:5174
# Compliance-portal HTTPS origin (<slug> is the compliance portal slug).
COMPLIANCE_PORTAL_PROXY_TARGET=https://<slug>.probopage.localhost