我正在尝试从保存在SPA中间件中的api其余文件中的控制器读取cookie
我有2个SPA项目(www.spa1.com,www.spa2.com),其余的一个(api.spa1.com,api.spa2.com)。我正在尝试从SPA中间件保存的api其余部分中的控制器读取cookie
SPA Middleware:
private void AddCookie(HttpContext context, string key, string value)
{
context.Response.Cookies.Append(key, value,
new CookieOptions
{
Path = "/",
Domain = context.Request.Host.Host,
HttpOnly = true,
Secure = true,
Expires = DateTimeOffset.Now.AddMonths(3),
SameSite = SameSiteMode.None
});
}