feat: require a write token or session on mutating portal API routes
- Adds IPFS_WRITE_TOKEN to lib/config.ts - Default-deny per route (not per method): the public explorer issues reads as POST - Existing portal session JWT remains valid, so the logged-in UI keeps working - Public gateway reads (/ipfs/<cid>) are unchanged
This commit is contained in:
@@ -22,3 +22,10 @@
|
||||
|
||||
# IPFS Gateway (for share links)
|
||||
# NEXT_PUBLIC_GATEWAY_URL=https://ipfs.maos.dedyn.io
|
||||
|
||||
# Write-authentication voor muterende /api/* endpoints
|
||||
# (POST /api/add, /api/files/upload, /api/pins; DELETE /api/files/<cid>, /api/pins/<cid>).
|
||||
# Zonder deze waarde blijven writes OPEN met een luide waarschuwing in de log.
|
||||
# Zelfde waarde als IPFS_WRITE_TOKEN aan de MAOS-kant (anders pint MAOS niet mee).
|
||||
# Genereer met: openssl rand -hex 32
|
||||
# IPFS_WRITE_TOKEN=
|
||||
|
||||
Reference in New Issue
Block a user