fix(api-gateway): correct Kong routing for trading-service

- Change strip_path to true to strip /api/v2/trading prefix
- Add /api/v2 to upstream URL so requests route correctly
- Revert accidental main.ts change

Request flow: /api/v2/trading/asset/market -> strip /api/v2/trading -> /asset/market -> upstream /api/v2/asset/market

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-15 05:27:46 -08:00
parent c60d3b2f26
commit a1508b208e
2 changed files with 5 additions and 4 deletions

View File

@ -309,18 +309,19 @@ services:
# ---------------------------------------------------------------------------
# Trading Service 2.0 - 交易服务
# 前端路径: /api/v2/trading/... -> 后端路径: /api/v2/...
# ---------------------------------------------------------------------------
- name: trading-service-v2
url: http://192.168.1.111:3022
url: http://192.168.1.111:3022/api/v2
routes:
- name: trading-v2-api
paths:
- /api/v2/trading
strip_path: false
strip_path: true
- name: trading-v2-health
paths:
- /api/v2/trading/health
strip_path: false
strip_path: true
# ---------------------------------------------------------------------------
# Mining Admin Service 2.0 - 挖矿管理后台服务

View File

@ -20,7 +20,7 @@ async function bootstrap() {
credentials: true,
});
app.setGlobalPrefix('api/v2/trading');
app.setGlobalPrefix('api/v2');
const config = new DocumentBuilder()
.setTitle('Trading Service API')