hasurafix
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user