- Add AuthGuard to validate API key for public access. - Create AuthModule to provide the AuthGuard globally. - Update API request interceptor to automatically include API key for non-localhost requests. - Modify .env and .env.example to include API_KEY configuration. - Enhance API request handling with improved error logging and client IP detection.
29 lines
670 B
Plaintext
29 lines
670 B
Plaintext
DATABASE_TYPE=mariadb
|
||
DATABASE_HOST=localhost
|
||
DATABASE_PORT=3306
|
||
DATABASE_USERNAME=root
|
||
DATABASE_PASSWORD=root
|
||
DATABASE_NAME=bidding
|
||
DATABASE_SYNCHRONIZE=true
|
||
|
||
# Slave 数据库配置(用于数据同步)
|
||
SLAVE_DATABASE_TYPE=mariadb
|
||
SLAVE_DATABASE_HOST=localhost
|
||
SLAVE_DATABASE_PORT=3306
|
||
SLAVE_DATABASE_USERNAME=root
|
||
SLAVE_DATABASE_PASSWORD=root
|
||
SLAVE_DATABASE_NAME=bidding_slave
|
||
|
||
# 代理配置(可选)
|
||
PROXY_HOST=127.0.0.1
|
||
PROXY_PORT=6000
|
||
# PROXY_USERNAME=
|
||
# PROXY_PASSWORD=
|
||
|
||
# 日志级别(可选):error, warn, info, debug, verbose
|
||
LOG_LEVEL=info
|
||
|
||
# OpenAI API Key (用于 AI 推荐)
|
||
ARK_API_KEY=your_openai_api_key_here
|
||
|
||
API_KEY=your_secure_api_key_here |