@@ -94,14 +94,14 @@ builder.Services.Configure<CookiePolicyOptions>(options =>
|
||||
options.CheckConsentNeeded = context => true;
|
||||
//options.MinimumSameSitePolicy = SameSiteMode.Strict;
|
||||
});
|
||||
var cookieDomain = builder.Configuration["CookieSettings:Domain"];
|
||||
|
||||
builder.Services.ConfigureApplicationCookie(options =>
|
||||
{
|
||||
//options.Cookie.Name = "GozarAuth";
|
||||
options.Cookie.HttpOnly = true;
|
||||
options.Cookie.SameSite = SameSiteMode.None; // مهم ✅
|
||||
options.Cookie.SecurePolicy = CookieSecurePolicy.Always; // فقط روی HTTPS کار میکنه ✅
|
||||
options.Cookie.Domain = cookieDomain; // دامنه مشترک بین پدر و سابدامینها ✅
|
||||
options.Cookie.Domain = ".dad-mehr.ir"; // دامنه مشترک بین پدر و سابدامینها ✅
|
||||
});
|
||||
|
||||
|
||||
@@ -263,13 +263,7 @@ builder.Services.AddCors(options =>
|
||||
"https://gozareshgir.ir",
|
||||
"https://dad-mehr.ir",
|
||||
"https://admin.dad-mehr.ir",
|
||||
"https://admin.gozareshgir.ir",
|
||||
"https://api.local.dad-mehr.ir",
|
||||
"https://local.dad-mehr.ir",
|
||||
"https://localhost:7080",
|
||||
"https://api.local.dad-mehr.ir:7080"
|
||||
//"http://localhost:3001",
|
||||
|
||||
"https://admin.gozareshgir.ir"
|
||||
)
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod()
|
||||
|
||||
Reference in New Issue
Block a user