Browse Source

🐛 fix(auth): 移除开发环境下的硬编码租户ID头

- 删除登录请求中仅在开发环境下添加的 `X-Tenant-Id: '2'` 请求头
- 确保生产与开发环境行为一致,避免潜在的配置混淆
yourname 2 weeks ago
parent
commit
093321ef7c
1 changed files with 1 additions and 6 deletions
  1. 1 6
      web/src/client/admin/hooks/AuthProvider.tsx

+ 1 - 6
web/src/client/admin/hooks/AuthProvider.tsx

@@ -88,12 +88,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
           username,
           username,
           password
           password
         }
         }
-      }, 
-      import.meta.env.DEV ? {
-        headers: {
-          'X-Tenant-Id': '2'
-        } 
-      }: undefined )
+      } )
       if (response.status !== 200) {
       if (response.status !== 200) {
         const result = await response.json()
         const result = await response.json()
         throw new Error(result.message);
         throw new Error(result.message);