Merge branch 'Test.Study' of http://192.168.3.69:3000/XCKJ/irc-netcore-api into Test.Study
commit
5c2467bdbb
|
@ -118,8 +118,8 @@ namespace IRaCIS.Api.Controllers
|
||||||
{
|
{
|
||||||
Expires = DateTime.Now.AddMonths(1),
|
Expires = DateTime.Now.AddMonths(1),
|
||||||
HttpOnly = true, // 确保 cookie 只能通过 HTTP 访问
|
HttpOnly = true, // 确保 cookie 只能通过 HTTP 访问
|
||||||
SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None, // 设置 SameSite 属性
|
SameSite = Microsoft.AspNetCore.Http.SameSiteMode.Unspecified, // 设置 SameSite 属性
|
||||||
Secure = true // 确保 cookie 只能通过 HTTPS 访问
|
Secure = false // 确保 cookie 只能通过 HTTPS 访问
|
||||||
};
|
};
|
||||||
|
|
||||||
HttpContext.Response.Cookies.Append("access_token", returnModel.Data.JWTStr, option);
|
HttpContext.Response.Cookies.Append("access_token", returnModel.Data.JWTStr, option);
|
||||||
|
|
Loading…
Reference in New Issue