workspace/projects/gamilit/apps/frontend/.env.production.example
rckrdmrd 8b12d7f231 fix(cors): Resolve duplicate CORS headers in production
## Problem
CORS error: "Access-Control-Allow-Origin header contains multiple values"
caused by both Nginx and NestJS sending CORS headers.

## Solution
- NestJS handles CORS exclusively (main.ts)
- Nginx acts as SSL proxy only (no CORS headers)
- Updated .env.production.example with HTTPS origins
- Created GUIA-CORS-PRODUCCION.md with complete documentation

## Files Changed
- .gitignore: Allow .env.*.example files
- apps/backend/.gitignore: Allow .env.*.example files
- apps/backend/.env.production.example: HTTPS CORS config
- apps/frontend/.env.production.example: HTTPS/WSS config
- docs/95-guias-desarrollo/GUIA-CORS-PRODUCCION.md: Full guide

## Production Steps
1. Update .env.production files with HTTPS origins
2. Remove CORS headers from Nginx config
3. Rebuild frontend, restart backend

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 10:24:01 -06:00

54 lines
1.7 KiB
Plaintext

# ============================================================================
# GAMILIT Frontend - Production Environment EXAMPLE
# ============================================================================
# COPIAR A .env.production
# Fecha: 2025-12-18
# Server: 74.208.126.102
# ============================================================================
# ==================== APPLICATION ====================
VITE_APP_NAME=GAMILIT Platform
VITE_APP_VERSION=1.0.0
VITE_APP_ENV=production
VITE_ENV=production
# ==================== API CONFIGURATION ====================
# IMPORTANTE: Usar HTTPS/WSS si el servidor tiene SSL configurado
# ============================================================================
# SSL CONFIGURADO - Usar HTTPS/WSS
# ============================================================================
VITE_API_HOST=74.208.126.102:3006
VITE_API_PROTOCOL=https
VITE_API_VERSION=v1
VITE_API_TIMEOUT=30000
# WebSocket configuration (WSS para conexiones seguras)
VITE_WS_HOST=74.208.126.102:3006
VITE_WS_PROTOCOL=wss
# ==================== AUTHENTICATION ====================
VITE_JWT_EXPIRATION=7d
# ==================== FEATURE FLAGS ====================
VITE_ENABLE_GAMIFICATION=true
VITE_ENABLE_SOCIAL_FEATURES=true
VITE_ENABLE_ANALYTICS=true
VITE_ENABLE_DEBUG=false
VITE_ENABLE_STORYBOOK=false
VITE_MOCK_API=false
# ==================== EXTERNAL SERVICES ====================
# Configurar en produccion si se usan
VITE_GOOGLE_ANALYTICS_ID=
VITE_SENTRY_DSN=
VITE_AI_SERVICE_URL=
# ==================== PRODUCTION ====================
VITE_ENABLE_DEBUG=false
VITE_LOG_LEVEL=error
# ==================== TESTING ====================
# NO usar credenciales en produccion
VITE_TEST_USER_EMAIL=
VITE_TEST_USER_PASSWORD=