From 7bf75d95027b4ca1c825d4d35ab2bf054e649e57 Mon Sep 17 00:00:00 2001 From: Suriya Date: Wed, 20 May 2026 17:20:52 +0530 Subject: [PATCH] graphqlfix --- src/components/TopicView.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/TopicView.jsx b/src/components/TopicView.jsx index 13661df..ce61ac4 100644 --- a/src/components/TopicView.jsx +++ b/src/components/TopicView.jsx @@ -7,9 +7,12 @@ import { LEGACY_BASE_URL, REST_BASE_URL } from '../data/topics' const ADMIN_SECRET = 'nearle-admin-secret' function toProxyPath(fullUrl, baseUrl) { - if (fullUrl.startsWith(baseUrl)) { - return fullUrl.slice(baseUrl.length) + // REST (jupiter.nearle.app): strip base so /live/... goes through Vite proxy + if (baseUrl === REST_BASE_URL && fullUrl.startsWith(REST_BASE_URL)) { + return fullUrl.slice(REST_BASE_URL.length) } + // Legacy (api.workolik.com): CORS is open — fetch the full URL directly. + // Admin secret is injected in the request header, so no proxy needed. return fullUrl }