From e8fa148ed4d9a10f44098eca9407234e7d3da7af Mon Sep 17 00:00:00 2001 From: Zzm0809 <934230207@qq.com> Date: Thu, 10 Oct 2024 17:12:17 +0800 Subject: [PATCH] change-token-key-name Signed-off-by: Zzm0809 <934230207@qq.com> --- .../src/main/java/org/dinky/interceptor/TenantInterceptor.java | 2 +- dinky-admin/src/main/resources/application.yml | 2 +- dinky-web/src/services/constants.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dinky-admin/src/main/java/org/dinky/interceptor/TenantInterceptor.java b/dinky-admin/src/main/java/org/dinky/interceptor/TenantInterceptor.java index 330509e29f..dc68927584 100644 --- a/dinky-admin/src/main/java/org/dinky/interceptor/TenantInterceptor.java +++ b/dinky-admin/src/main/java/org/dinky/interceptor/TenantInterceptor.java @@ -59,7 +59,7 @@ public boolean preHandle(HttpServletRequest request, @NotNull HttpServletRespons if (Asserts.isNotNull(cookies)) { for (Cookie cookie : cookies) { switch (cookie.getName()) { - case "token": + case "dinky-token": token = Opt.ofBlankAble(cookie.getValue()); SaTokenDao saTokenDao = SaManager.getSaTokenDao(); String keyTokenValue = StpUtil.getStpLogic().splicingKeyTokenValue(token.get()); diff --git a/dinky-admin/src/main/resources/application.yml b/dinky-admin/src/main/resources/application.yml index a8c537a333..0855ab1b26 100644 --- a/dinky-admin/src/main/resources/application.yml +++ b/dinky-admin/src/main/resources/application.yml @@ -145,7 +145,7 @@ sa-token: is-write-header: true # is read header is-read-header: true - token-name: token + token-name: dinky-token is-read-cookie: true --- diff --git a/dinky-web/src/services/constants.tsx b/dinky-web/src/services/constants.tsx index c1dadc54e2..209361dd8d 100644 --- a/dinky-web/src/services/constants.tsx +++ b/dinky-web/src/services/constants.tsx @@ -35,7 +35,7 @@ export const LANGUAGE_EN = 'en-US'; export const SERVER_VERSION = 'dinky_server_version'; -export const TOKEN_KEY = 'token'; +export const TOKEN_KEY = 'dinky-token'; export const DATE_FORMAT = 'YYYY-MM-DD'; export const DATETIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';