From d2c69486262d2fc76cb395275403f9dceb5d60b3 Mon Sep 17 00:00:00 2001 From: Gokul Date: Thu, 21 May 2026 12:52:34 +0530 Subject: [PATCH] changes in topicview.jsx --- env.example | 6 ------ src/components/TopicView.jsx | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 env.example diff --git a/env.example b/env.example deleted file mode 100644 index 814ad70..0000000 --- a/env.example +++ /dev/null @@ -1,6 +0,0 @@ -# Copy this file to .env.local and set the real value. -# NO `VITE_` prefix — the secret stays server-side and is never bundled. -HASURA_ADMIN_SECRET=your-hasura-admin-secret-here - -# Optional production server port (defaults to 3000) -# PORT=3000 diff --git a/src/components/TopicView.jsx b/src/components/TopicView.jsx index c991020..c31883d 100644 --- a/src/components/TopicView.jsx +++ b/src/components/TopicView.jsx @@ -11,10 +11,10 @@ function toProxyPath(fullUrl) { if (fullUrl.startsWith(LEGACY_BASE_URL)) { return fullUrl.slice(LEGACY_BASE_URL.length) } - - // REST API (jupiter.nearle.app): We used to proxy this to avoid CORS issues, - // but we fixed CORS on the Kubernetes backend yesterday (jupiter-cors-proxy)! - // So we can now fetch from the full URL directly. + // REST API (jupiter.nearle.app): Proxy requests through local server to avoid CORS issues + if (fullUrl.startsWith(REST_BASE_URL)) { + return fullUrl.slice(REST_BASE_URL.length) + } return fullUrl }