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 }