From c2820d6b0791d28e256fad13ff803b230c0d98b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Sun, 5 Apr 2026 07:50:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3RoleAuthManager?= =?UTF-8?q?=E7=9A=84API=5FBASE=5FURL=E6=8C=87=E5=90=91gateway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根本原因: - RoleAuthManager直接向后端发送请求(http://localhost:8084) - 绕过了gateway的签名验证 - 导致认证失败 修复方案: - 修改API_BASE_URL指向gateway(http://localhost:8080) - 确保所有请求都通过gateway进行签名验证 影响范围: - Token注入登录测试 - 所有需要认证的测试 --- .../e2e/role-based-tests/shared/role-auth-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/novalon-manage-web/e2e/role-based-tests/shared/role-auth-manager.ts b/novalon-manage-web/e2e/role-based-tests/shared/role-auth-manager.ts index bd789c4..58e8848 100644 --- a/novalon-manage-web/e2e/role-based-tests/shared/role-auth-manager.ts +++ b/novalon-manage-web/e2e/role-based-tests/shared/role-auth-manager.ts @@ -10,7 +10,7 @@ const SIGNATURE_SECRET = 'NovalonManageSystemSecretKey2026'; export class RoleAuthManager { private static tokenCache: Map = new Map(); - private static readonly API_BASE_URL = process.env.VITE_API_BASE_URL || 'http://localhost:8084'; + private static readonly API_BASE_URL = process.env.VITE_API_BASE_URL || 'http://localhost:8080'; private static readonly TOKEN_EXPIRY_BUFFER = 60000; static async getRoleToken(roleName: string): Promise {