refactor: use this in static method

This commit is contained in:
2024-08-10 23:11:43 +03:00
parent c51a9cecc9
commit b1250616a7
3 changed files with 7 additions and 3 deletions

View File

@ -30,9 +30,11 @@ public class AuthController(IOptionsSnapshot<Admin> user, AuthService auth, Pass
{
Expires = expires,
Path = UrlHelper.GetSubPathWithoutFirstApiName + "api",
Domain = UrlHelper.CurrentDomain(ControllerContext.HttpContext),
Domain = HttpContext.GetCurrentDomain(),
#if !DEBUG
Secure = true,
HttpOnly = true
#endif
};
Response.Cookies.Append(name, value, cookieOptions);