From 436b627f3ec523749a7640f9881e9901ce491a06 Mon Sep 17 00:00:00 2001 From: cat_shark <1716967236@qq.com> Date: Fri, 3 Oct 2025 09:53:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(10):=20=E4=BF=AE=E6=AD=A3=E5=89=8D=E7=AB=AF?= =?UTF-8?q?cookie=E5=86=99=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E6=8C=87=E5=AE=9Asame-site=EF=BC=8C=E9=98=B2=E6=AD=A2=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E9=98=BB=E6=AD=A2cookie=E7=9A=84=E5=86=99?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 4 ++++ src/main/resources/application-local.yml | 6 +++++- src/main/resources/application.yml | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index dd32349..6edf93c 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -13,3 +13,7 @@ cors: - http://192.168.123.199:5158 - http://39.105.149.197:8115 - https://lpt.cat-shark.xyz + +sa-token: + cookie: + secure: true diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 7a99839..82fe589 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -11,4 +11,8 @@ server: cors: allowed-origins: - http://localhost:5158 - - http://192.168.123.199:5158 \ No newline at end of file + - http://192.168.123.199:5158 + +sa-token: + cookie: + secure: false \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a29f410..369bfdc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -30,6 +30,8 @@ mybatis-plus: sa-token: # token 名称(同时也是 cookie 名称) token-name: satoken + cookie: + same-site: None # token 有效期(单位:秒) 默认30天,-1 代表永久有效 timeout: 2592000 # token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结