feat(storage): refactor storage config and remove module registry
Introduce a dedicated `storage-config.js` for registering public prefixes and access policies via `configureStorageApi()`, replacing the previous `getAllStoragePublicPrefixes` / `getAllStorageAccessPolicies` imports from the module registry. Remove `getAllApiRoutes()` from the router so module-level routes are no longer auto-collected; feature routes must now be registered explicitly via `registerFeatureRoutes()` during `initializeZen()`. Update `.env.example` to document separate `ZEN_STORAGE_PROVIDER`, `ZEN_STORAGE_B2_*` variables for Backblaze B2 alongside the existing Cloudflare R2 variables, making provider selection explicit. Clean up admin navigation and page components to drop module-injected nav entries, keeping only core and system sections.
This commit is contained in:
+14
-3
@@ -15,15 +15,26 @@ ZEN_DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/postgres
|
||||
ZEN_DATABASE_URL_DEV=postgres://USER:PASSWORD@HOST:PORT/postgres_dev
|
||||
ZEN_DB_SSL_DISABLED=false
|
||||
|
||||
# STORAGE (S3-compatible — Cloudflare R2 ou Backblaze B2)
|
||||
# R2 : ZEN_STORAGE_ENDPOINT=<accountId>.r2.cloudflarestorage.com ZEN_STORAGE_REGION=auto
|
||||
# B2 : ZEN_STORAGE_ENDPOINT=s3.<region>.backblazeb2.com ZEN_STORAGE_REGION=<region>
|
||||
# STORAGE
|
||||
# Fournisseur : 'r2' (défaut) ou 'backblaze'
|
||||
ZEN_STORAGE_PROVIDER=r2
|
||||
|
||||
# Cloudflare R2 (ZEN_STORAGE_PROVIDER=r2)
|
||||
# Endpoint format : <accountId>.r2.cloudflarestorage.com
|
||||
ZEN_STORAGE_ENDPOINT=
|
||||
ZEN_STORAGE_REGION=auto
|
||||
ZEN_STORAGE_BUCKET=
|
||||
ZEN_STORAGE_ACCESS_KEY=
|
||||
ZEN_STORAGE_SECRET_KEY=
|
||||
|
||||
# Backblaze B2 (ZEN_STORAGE_PROVIDER=backblaze)
|
||||
# Endpoint format : s3.<region>.backblazeb2.com
|
||||
ZEN_STORAGE_B2_ENDPOINT=
|
||||
ZEN_STORAGE_B2_REGION=
|
||||
ZEN_STORAGE_B2_BUCKET=
|
||||
ZEN_STORAGE_B2_ACCESS_KEY=
|
||||
ZEN_STORAGE_B2_SECRET_KEY=
|
||||
|
||||
# EMAIL
|
||||
ZEN_EMAIL_RESEND_APIKEY=
|
||||
ZEN_EMAIL_FROM_NAME="EXEMPLE"
|
||||
|
||||
Reference in New Issue
Block a user