Files
gpt-load/.env.example
T
tbphp 6c639478dc feat: Security-hardening Optimization (#225)
* fix: code error

* feat: opz security

* feat: Optimize batch key encryption

* feat: Optimize batch test key

* feat: Perfect encryption key

* docs: failed-to-decrypt

* feat: Security alert

* feat: Encryption migrate command

* fix: migrate command error

* feat: Adjust data length

* feat: Adjust data length

* docs: input text

* fix: Deterministic Encryption

* feat: Optimize security algorithms

* feat: Support KeyHash

* fix: Fix migration script field order issue

* fix: Fix log export key issue

* fix: code style

* fix: migrate order offset

* fix: Resolve migration script compatibility issues

* feat: Adjust Redis cleanup policy

* fix: migrate for sqlite

* fix: migrate

* fix: rm group_key_inx

* fix: rm group_key_inx

* fix: filter null hash data

* docs: log warn

* docs: update readme
2025-09-05 15:45:16 +08:00

89 lines
2.2 KiB
Bash

# ==================================
# SERVER CONFIGURATION
# ==================================
# Server host and port
PORT=3001
HOST=0.0.0.0
# Server timeout settings (in seconds)
SERVER_READ_TIMEOUT=60
SERVER_WRITE_TIMEOUT=600
SERVER_IDLE_TIMEOUT=120
SERVER_GRACEFUL_SHUTDOWN_TIMEOUT=10
# ==================================
# CLUSTER CONFIGURATION
# ==================================
# Set to true for slave nodes in cluster setup
IS_SLAVE=false
# ==================================
# LOCALIZATION
# ==================================
# Timezone setting
TZ=Asia/Shanghai
# ==================================
# SECURITY
# ==================================
# Authentication key is required to protect the management API and UI.
# Please use a long, random string for security.
AUTH_KEY=
# ENCRYPTION_KEY encrypts API keys at rest. Use any string or leave empty to disable.
ENCRYPTION_KEY=
# ==================================
# DATABASE CONFIGURATION
# ==================================
# Database connection string (leave empty to use SQLite at ./data/gpt-load.db)
# MySQL example:
# DATABASE_DSN=root:123456@tcp(mysql:3306)/gpt-load?charset=utf8mb4&parseTime=True&loc=Local
# PostgreSQL example:
# DATABASE_DSN=postgres://postgres:123456@postgres:5432/gpt-load?sslmode=disable
DATABASE_DSN=
# ==================================
# CACHE CONFIGURATION
# ==================================
# Redis connection string (leave empty to use in-memory storage)
# Example: redis://redis:6379/0
REDIS_DSN=
# ==================================
# PERFORMANCE
# ==================================
# Maximum concurrent requests
MAX_CONCURRENT_REQUESTS=100
# ==================================
# CORS CONFIGURATION
# ==================================
# Enable Cross-Origin Resource Sharing
ENABLE_CORS=true
ALLOWED_ORIGINS=*
ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
ALLOWED_HEADERS=*
ALLOW_CREDENTIALS=false
# ==================================
# LOGGING CONFIGURATION
# ==================================
# Log level (debug, info, warn, error)
LOG_LEVEL=info
# Log format (text, json)
LOG_FORMAT=text
# Enable file logging
LOG_ENABLE_FILE=true
# Log file path
LOG_FILE_PATH=./data/logs/app.log