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
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// In dev, the Kubo API is behind nginx with Basic Auth.
|
||||
// If no KUBO_API_URL is configured, return a clear error.
|
||||
|
||||
Reference in New Issue
Block a user