hasurafix

This commit is contained in:
2026-05-22 11:18:59 +05:30
parent 25dcc9ad59
commit 805b465ae6

View File

@@ -7,14 +7,7 @@ import { LEGACY_BASE_URL, REST_BASE_URL } from '../data/topics'
const ADMIN_SECRET = 'nearle-admin-secret' const ADMIN_SECRET = 'nearle-admin-secret'
function toProxyPath(fullUrl) { function toProxyPath(fullUrl) {
// Legacy (api.workolik.com): We still proxy this to inject the admin secret via server // We can now fetch from the full URL directly since CORS is enabled on the backend!
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.
return fullUrl return fullUrl
} }