feat(auth): implement API key authentication and enhance request handling
- 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.
This commit is contained in:
@@ -24,4 +24,6 @@ PROXY_PORT=6000
|
||||
LOG_LEVEL=info
|
||||
|
||||
# OpenAI API Key (用于 AI 推荐)
|
||||
ARK_API_KEY=your_openai_api_key_here
|
||||
ARK_API_KEY=your_openai_api_key_here
|
||||
|
||||
API_KEY=your_secure_api_key_here
|
||||
Reference in New Issue
Block a user