mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
Merge branch 'dev' into um-5
This commit is contained in:
11
src/app.js
11
src/app.js
@@ -134,6 +134,17 @@ class Application {
|
||||
// 📝 请求日志(使用自定义logger而不是morgan)
|
||||
this.app.use(requestLogger)
|
||||
|
||||
// 🐛 HTTP调试拦截器(仅在启用调试时生效)
|
||||
if (process.env.DEBUG_HTTP_TRAFFIC === 'true') {
|
||||
try {
|
||||
const { debugInterceptor } = require('./middleware/debugInterceptor')
|
||||
this.app.use(debugInterceptor)
|
||||
logger.info('🐛 HTTP调试拦截器已启用 - 日志输出到 logs/http-debug-*.log')
|
||||
} catch (error) {
|
||||
logger.warn('⚠️ 无法加载HTTP调试拦截器:', error.message)
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 基础中间件
|
||||
this.app.use(
|
||||
express.json({
|
||||
|
||||
Reference in New Issue
Block a user