Proxy compliance portal API paths in Vite
Vite only forwarded /graphql, so /initiate?continue=… fell through to the SPA and the locale loader rewrote it to /en/initiate. Match the host-root API routes (including query strings) so local OAuth hits the Go backend. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -113,8 +113,10 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
port: 5174,
|
port: 5174,
|
||||||
proxy: proxyTarget
|
proxy: proxyTarget
|
||||||
? {
|
? {
|
||||||
"^/graphql": {
|
|
||||||
// Host-routed compliance-portal API (trust-center HTTPS listener).
|
// Host-routed compliance-portal API (trust-center HTTPS listener).
|
||||||
|
// Match pathname only; req.url may include ?continue=… etc.
|
||||||
|
"^/(?:graphql|initiate|callback|brand/(?:logo|dark-logo)|\\.well-known/oauth-client-metadata)(?:\\?|$)":
|
||||||
|
{
|
||||||
target: proxyTarget,
|
target: proxyTarget,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false, // local step-ca
|
secure: false, // local step-ca
|
||||||
|
|||||||
Reference in New Issue
Block a user