furt/.env.example
michael 445e751c16 feat(api): implement CORS support with environment-based configuration
- Add CORS headers to all API responses in main.lua
- Implement OPTIONS preflight request handling
- Add environment-variable based CORS origin configuration
- Create production.env.example for deployment documentation
- Update .env.example with CORS_ALLOWED_ORIGINS setting

Resolves cross-origin request blocking for Hugo dev server integration.
CORS origins now configurable via CORS_ALLOWED_ORIGINS environment variable
for production deployments while maintaining dev-friendly defaults.

Related to #49
2025-06-24 19:42:44 +02:00

41 lines
1.1 KiB
Text

# Gitea-Konfiguration für Issue-Management
GITEA_URL=https://your-gitea-instance.com
REPO_OWNER=your-username
REPO_NAME=furt
GITEA_TOKEN=your-gitea-token-here
# Optional: Default-Assignee für Issues
DEFAULT_ASSIGNEE=your-username
# Lua-Konfiguration
LUA_COMMAND=lua51
LUA_VERSION=5.1
# Gateway-Konfiguration (für Entwicklung)
GATEWAY_PORT=8080
GATEWAY_LOG_LEVEL=info
# CORS-Konfiguration (comma-separated list)
# Development (default if not set):
# CORS_ALLOWED_ORIGINS=http://localhost:1313,http://127.0.0.1:1313
#
# Production example:
# CORS_ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
CORS_ALLOWED_ORIGINS=http://localhost:1313,http://127.0.0.1:1313
# Service-Ports (für lokale Entwicklung)
FORMULAR2MAIL_PORT=8081
SAGJAN_PORT=8082
# SMTP-Konfiguration (für formular2mail)
SMTP_HOST=localhost
SMTP_PORT=25
SMTP_USERNAME=noreply@example.com
SMTP_PASSWORD=secret-password
SMTP_FROM=noreply@example.com
SMTP_TO=admin@example.com
# API-Schlüssel (generiere sichere Schlüssel für Produktion!)
HUGO_API_KEY=change-me-in-production
ADMIN_API_KEY=change-me-in-production