feat: add sub path for actual url
This commit is contained in:
@ -69,11 +69,11 @@ public partial class SetupController(
|
||||
|
||||
Response.Cookies.Append("AuthToken", token, new CookieOptions
|
||||
{
|
||||
HttpOnly = false,
|
||||
Secure = false,
|
||||
Path = "/"
|
||||
Path = UrlHelper.GetSubPath + "api",
|
||||
Domain = UrlHelper.CurrentDomain(ControllerContext.HttpContext),
|
||||
Secure = true,
|
||||
HttpOnly = true
|
||||
});
|
||||
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ using Microsoft.Extensions.Options;
|
||||
using Mirea.Api.Dto.Common;
|
||||
using Mirea.Api.Dto.Requests;
|
||||
using Mirea.Api.Dto.Responses;
|
||||
using Mirea.Api.Endpoint.Common.Services;
|
||||
using Mirea.Api.Endpoint.Common.Settings;
|
||||
using Mirea.Api.Security.Common.Dto.Requests;
|
||||
using Mirea.Api.Security.Services;
|
||||
@ -28,8 +29,8 @@ public class AuthController(IOptionsSnapshot<Admin> user, AuthService auth, Pass
|
||||
var cookieOptions = new CookieOptions
|
||||
{
|
||||
Expires = expires,
|
||||
Path = "/api",
|
||||
Domain = Request.Headers["X-Forwarded-Host"],
|
||||
Path = UrlHelper.GetSubPath + "api",
|
||||
Domain = UrlHelper.CurrentDomain(ControllerContext.HttpContext),
|
||||
Secure = true,
|
||||
HttpOnly = true
|
||||
};
|
||||
|
Reference in New Issue
Block a user