fix: altijd lokale pins gebruiken, ongeacht Kubo config
This commit is contained in:
@@ -6,14 +6,12 @@ export async function proxyIPFS(path: string, method: string, req: NextRequest):
|
|||||||
// Normalize path
|
// Normalize path
|
||||||
const p = path.replace(/^\/+/, '').replace(/\/+$/, '');
|
const p = path.replace(/^\/+/, '').replace(/\/+$/, '');
|
||||||
|
|
||||||
// ── Lokale pin opslag (zonder Kubo) ──
|
// ── Lokale pin opslag (altijd, ongeacht Kubo) ──
|
||||||
// Wanneer KUBO_API_URL niet beschikbaar is, gebruik lokale JSON file
|
// Pins worden lokaal opgeslagen in .data/pins.json
|
||||||
|
// Kubo wordt later toegevoegd voor productie
|
||||||
if (p === 'pins' || p.startsWith('pins/')) {
|
if (p === 'pins' || p.startsWith('pins/')) {
|
||||||
const kuboSvc = kuboApiUrl();
|
|
||||||
if (!kuboSvc) {
|
|
||||||
return handleLocalPins(p, method, req);
|
return handleLocalPins(p, method, req);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// In dev, the Kubo API is behind nginx with Basic Auth.
|
// In dev, the Kubo API is behind nginx with Basic Auth.
|
||||||
// If no KUBO_API_URL is configured, return a clear error.
|
// If no KUBO_API_URL is configured, return a clear error.
|
||||||
|
|||||||
Reference in New Issue
Block a user