diff --git a/Bootstrap.Admin/Startup.cs b/Bootstrap.Admin/Startup.cs index 2ee0d6bf..de5d3eb1 100644 --- a/Bootstrap.Admin/Startup.cs +++ b/Bootstrap.Admin/Startup.cs @@ -83,7 +83,7 @@ namespace Bootstrap.Admin services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => { options.Cookie.Path = "/"; - options.Cookie.Domain = Configuration["Domain"]; + if (!string.IsNullOrEmpty(Configuration["Domain"])) options.Cookie.Domain = Configuration["Domain"]; }); services.AddApiVersioning(option => { diff --git a/Bootstrap.Client/Startup.cs b/Bootstrap.Client/Startup.cs index 99734319..97c435ac 100644 --- a/Bootstrap.Client/Startup.cs +++ b/Bootstrap.Client/Startup.cs @@ -60,7 +60,7 @@ namespace Bootstrap.Client services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => { options.Cookie.Path = "/"; - options.Cookie.Domain = Configuration["Domain"]; + if (!string.IsNullOrEmpty(Configuration["Domain"])) options.Cookie.Domain = Configuration["Domain"]; options.RebuildRedirectUri(Configuration["AuthHost"]); }); }