From e96f56c82f125739b1a340b685a67ea2bccc30e8 Mon Sep 17 00:00:00 2001 From: nikitita Date: Fri, 16 Oct 2026 12:56:55 +0200 Subject: [PATCH] fix: use Apache proxy for GraphQL in production --- frontend/src/api/graphqlUrl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/graphqlUrl.ts b/frontend/src/api/graphqlUrl.ts index f9c6d8d..1d91417 100644 --- a/frontend/src/api/graphqlUrl.ts +++ b/frontend/src/api/graphqlUrl.ts @@ -1,5 +1,6 @@ const defaultGraphqlUrl = import.meta.env.DEV ? "http://localhost:3001/" - : `${window.location.protocol}//${window.location.hostname}:3001/`; + : "/graphql"; -export const GRAPHQL_URL = import.meta.env.VITE_GRAPHQL_URL || defaultGraphqlUrl; \ No newline at end of file +export const GRAPHQL_URL = + import.meta.env.VITE_GRAPHQL_URL || defaultGraphqlUrl; \ No newline at end of file