fix: altijd lokale pins gebruiken, ongeacht Kubo config

This commit is contained in:
maikrolf
2026-09-19 17:20:21 +02:00
parent b67e735e04
commit bdc6805b89
+4 -6
View File
@@ -6,13 +6,11 @@ export async function proxyIPFS(path: string, method: string, req: NextRequest):
// Normalize path
const p = path.replace(/^\/+/, '').replace(/\/+$/, '');
// ── Lokale pin opslag (zonder Kubo) ──
// Wanneer KUBO_API_URL niet beschikbaar is, gebruik lokale JSON file
// ── Lokale pin opslag (altijd, ongeacht Kubo) ──
// Pins worden lokaal opgeslagen in .data/pins.json
// Kubo wordt later toegevoegd voor productie
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.