security: comprehensive hardening pass — CSP, CORS lockdown, CSRF strict-origin, error leak redaction, crypto visitor IDs, rate limiter fix, catalog admin guard, ESM imports, production cookie flags
This commit is contained in:
+32
-7
@@ -2,13 +2,38 @@
|
||||
# CRE Innovations - Web Studio Environment Configuration
|
||||
# =========================================================================
|
||||
|
||||
# Remote Production API Integration
|
||||
API_SECRET_DEFAULT=your_api_secret_here
|
||||
# ---------------------------------------------------------------------------
|
||||
# Site URL (server-only; used for sitemap, SEO, canonical links)
|
||||
# ---------------------------------------------------------------------------
|
||||
SITE_URL=http://localhost:3000
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
# Remote Production API Integration
|
||||
# IMPORTANT: Use a strong random value. Never use 'abcdef' in production.
|
||||
# Generate with: openssl rand -hex 32
|
||||
# ---------------------------------------------------------------------------
|
||||
API_SECRET_DEFAULT=REPLACE_WITH_STRONG_RANDOM_SECRET
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Backend URL override (optional — only needed if inference server differs from catalog URL)
|
||||
# ---------------------------------------------------------------------------
|
||||
# API_BACKEND_URL=https://your-inference-server.example.com
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Catalog Admin Secret — protects /api/catalog/reload from unauthenticated access
|
||||
# Generate with: openssl rand -hex 32
|
||||
# ---------------------------------------------------------------------------
|
||||
CATALOG_ADMIN_SECRET=REPLACE_WITH_32_CHAR_HEX
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# CORS origin for /api/* routes. Set to your production domain in production.
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOWED_ORIGIN=http://localhost:3000
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Firebase Client SDK Configuration (Required for Live Client Auth)
|
||||
# Obtain from: Firebase Console > Project Settings > General > Your apps (Web)
|
||||
# -------------------------------------------------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
|
||||
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
|
||||
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
|
||||
@@ -17,10 +42,10 @@ NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
|
||||
NEXT_PUBLIC_FIREBASE_APP_ID=1:your_app_id:web:your_web_id
|
||||
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
# Firebase Admin SDK Configuration (Required for Server Session Minting)
|
||||
# Obtain from: Firebase Console > Project Settings > Service accounts > Generate new private key
|
||||
# -------------------------------------------------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
FIREBASE_PROJECT_ID=your_project_id
|
||||
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxxxx@your_project_id.iam.gserviceaccount.com
|
||||
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC...\n-----END PRIVATE KEY-----\n"
|
||||
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC....\n-----END PRIVATE KEY-----\n"
|
||||
|
||||
Reference in New Issue
Block a user