Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Minor improvements - move application settings to the new class SecurityConfig (changes in App_Settings)

supportb5ca793cce5c
diff --git a/src/Business/Grand.Business.Authentication/Services/CookieAuthenticationService.cs b/src/Business/Grand.Business.Authentication/Services/CookieAuthenticationService.cs
index 21102778b..917ce71c0 100644
--- a/src/Business/Grand.Business.Authentication/Services/CookieAuthenticationService.cs
+++ b/src/Business/Grand.Business.Authentication/Services/CookieAuthenticationService.cs
@@ -20,7 +20,7 @@ namespace Grand.Business.Authentication.Services
{
#region Const
- private string CUSTOMER_COOKIE_NAME => $"{_appConfig.CookiePrefix}Customer";
+ private string CUSTOMER_COOKIE_NAME => $"{_securityConfig.CookiePrefix}Customer";
#endregion
@@ -31,7 +31,7 @@ namespace Grand.Business.Authentication.Services
private readonly IGroupService _groupService;
private readonly IUserFieldService _userFieldService;
private readonly IHttpContextAccessor _httpContextAccessor;
- private readonly AppConfig _appConfig;
+ private readonly SecurityConfig _securityConfig;
private Customer _cachedCustomer;
#endregion
@@ -46,21 +46,21 @@ namespace Grand.Business.Authentication.Services
/// <param name="groupService">Group service</param>
/// <param name="userFieldService">Generic sttribute service</param>
/// <param name="httpContextAccessor">HTTP context accessor</param>
- /// <param name="AppConfig">AppConfig</param>
+ /// <param name="SecurityConfig">SecurityConfig</param>
public CookieAuthenticationService(
CustomerSettings customerSettings,
ICustomerService customerService,
IGroupService groupService,
IUserFieldService userFieldService,
IHttpContextAccessor httpContextAccessor,
- AppConfig appConfig)
+ SecurityConfig securityConfig)
{
_customerSettings = customerSettings;
_customerService = customerService;
_groupService = groupService;
_userFieldService = userFieldService;
_httpContextAccessor = httpContextAccessor;
- _appConfig = appConfig;
+ _securityConfig = securityConfig;
}
@@ -82,10 +82,10 @@ namespace Grand.Business.Authentication.Services
var claims = new List<Claim>();
if (!string.IsNullOrEmpty(customer.Username))
- claims.Add(new Claim(ClaimTypes.Name, customer.Username, ClaimValueTypes.String, _appConfig.CookieClaimsIssuer));
+ claims.Add(new Claim(ClaimTypes.Name, customer.Username, ClaimValueTypes.String, _securityConfig.CookieClaimsIssuer));
if (!string.IsNullOrEmpty(customer.Email))
- claims.Add(new Claim(ClaimTypes.Email, customer.Email, ClaimValueTypes.Email, _appConfig.CookieClaimsIssuer));
+ claims.Add(new Claim(ClaimTypes.Email, customer.Email, ClaimValueTypes.Email, _securityConfig.CookieClaimsIssuer));
//add token
var passwordtoken = await customer.GetUserField<string>(_userFieldService, SystemCustomerFieldNames.PasswordToken);
@@ -93,10 +93,10 @@ namespace Grand.Business.Authentication.Services
{
var passwordguid = Guid.NewGuid().ToString();
await _userFieldService.SaveField(customer, SystemCustomerFieldNames.PasswordToken, passwordguid);
- claims.Add(new Claim(ClaimTypes.UserData, passwordguid, ClaimValueTypes.String, _appConfig.CookieClaimsIssuer));
+ claims.Add(new Claim(ClaimTypes.UserData, passwordguid, ClaimValueTypes.String, _securityConfig.CookieClaimsIssuer));
}
else
- claims.Add(new Claim(ClaimTypes.UserData, passwordtoken, ClaimValueTypes.String, _appConfig.CookieClaimsIssuer));
+ claims.Add(new Claim(ClaimTypes.UserData, passwordtoken, ClaimValueTypes.String, _securityConfig.CookieClaimsIssuer));
//create principal for the present scheme of authentication
var userIdentity = new ClaimsIdentity(claims, GrandCookieAuthenticationDefaults.AuthenticationScheme);
@@ -151,7 +151,7 @@ namespace Grand.Business.Authentication.Services
{
//get customer by username if exists
var usernameClaim = authenticateResult.Principal.FindFirst(claim => claim.Type == ClaimTypes.Name
- && claim.Issuer.Equals(_appConfig.CookieClaimsIssuer, StringComparison.InvariantCultureIgnoreCase));
+ && claim.Issuer.Equals(_securityConfig.CookieClaimsIssuer, StringComparison.InvariantCultureIgnoreCase));
if (usernameClaim != null)
customer = await _customerService.GetCustomerByUsername(usernameClaim.Value);
}
@@ -159,7 +159,7 @@ namespace Grand.Business.Authentication.Services
{
//get customer by email
var emailClaim = authenticateResult.Principal.FindFirst(claim => claim.Type == ClaimTypes.Email
- && claim.Issuer.Equals(_appConfig.CookieClaimsIssuer, StringComparison.InvariantCultureIgnoreCase));
+ && claim.Issuer.Equals(_securityConfig.CookieClaimsIssuer, StringComparison.InvariantCultureIgnoreCase));
if (emailClaim != null)
customer = await _customerService.GetCustomerByEmail(emailClaim.Value);
}
@@ -170,7 +170,7 @@ namespace Grand.Business.Authentication.Services
if (!string.IsNullOrEmpty(passwordtoken))
{
var tokenClaim = authenticateResult.Principal.FindFirst(claim => claim.Type == ClaimTypes.UserData
- && claim.Issuer.Equals(_appConfig.CookieClaimsIssuer, StringComparison.InvariantCultureIgnoreCase));
+ && claim.Issuer.Equals(_securityConfig.CookieClaimsIssuer, StringComparison.InvariantCultureIgnoreCase));
if (tokenClaim == null || tokenClaim.Value != passwordtoken)
{
customer = null;
diff --git a/src/Core/Grand.Infrastructure/Configuration/AppConfig.cs b/src/Core/Grand.Infrastructure/Configuration/AppConfig.cs
index 60812e022..399d7c736 100644
--- a/src/Core/Grand.Infrastructure/Configuration/AppConfig.cs
+++ b/src/Core/Grand.Infrastructure/Configuration/AppConfig.cs
@@ -25,7 +25,6 @@ namespace Grand.Infrastructure.Configuration
/// </summary>
public bool SkipMigrationProcess { get; set; }
-
/// <summary>
/// Gets or sets a value indicating whether to clear /Plugins/bin directory on application startup
/// </summary>
@@ -46,22 +45,6 @@ namespace Grand.Infrastructure.Configuration
/// Enable scripting C# applications to execute code.
/// </summary>
public bool UseRoslynScripts { get; set; }
-
-
- /// <summary>
- /// Gets or sets a value indicating for cookie expires in hours - default 24 * 365 = 8760
- /// </summary>
- public int CookieAuthExpires { get; set; }
-
- /// <summary>
- /// Gets or sets a value for Cookie prefix
- /// </summary>
- public string CookiePrefix { get; set; }
-
- /// <summary>
- /// Gets or sets a value for Cookie claim issuer
- /// </summary>
- public string CookieClaimsIssuer { get; set; }
/// <summary>
/// A value indicating whether SEO friendly URLs with multiple languages are enabled
@@ -74,41 +57,13 @@ namespace Grand.Infrastructure.Configuration
/// </summary>
public string StaticFilesCacheControl { get; set; }
- /// <summary>
- /// Gets or sets a value of "Cookie SecurePolicy Always"
- /// </summary>
- public bool CookieSecurePolicyAlways { get; set; }
-
+
/// <summary>
/// Gets or sets a value indicating whether to display the full error in production environment.
/// It's ignored (always enabled) in development environment
/// </summary>
public bool DisplayFullErrorStack { get; set; }
-
-
- /// <summary>
- /// Gets or sets a value indicating whether use the default security headers for your application
- /// </summary>
- public bool UseDefaultSecurityHeaders { get; set; }
-
-
public bool UseSessionStateTempDataProvider { get; set; }
-
-
- /// <summary>
- /// HTTP Strict Transport Security Protocol
- /// isn't recommended in development because the HSTS header is highly cacheable by browsers
- /// </summary>
- public bool UseHsts { get; set; }
-
- /// <summary>
- /// Enforce HTTPS in ASP.NET Core
- /// </summary>
- public bool UseHttpsRedirection { get; set; }
-
- public int HttpsRedirectionRedirect { get; set; }
- public int? HttpsRedirectionHttpsPort { get; set; }
-
/// <summary>
/// Localization middleware
/// </summary>
diff --git a/src/Core/Grand.Infrastructure/Configuration/SecurityConfig.cs b/src/Core/Grand.Infrastructure/Configuration/SecurityConfig.cs
new file mode 100644
index 000000000..ac78c1927
--- /dev/null
+++ b/src/Core/Grand.Infrastructure/Configuration/SecurityConfig.cs
@@ -0,0 +1,44 @@
+namespace Grand.Infrastructure.Configuration
+{
+ public partial class SecurityConfig
+ {
+ /// <summary>
+ /// Gets or sets a value indicating for cookie expires in hours - default 24 * 365 = 8760
+ /// </summary>
+ public int CookieAuthExpires { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value for Cookie prefix
+ /// </summary>
+ public string CookiePrefix { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value for Cookie claim issuer
+ /// </summary>
+ public string CookieClaimsIssuer { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value of "Cookie SecurePolicy Always"
+ /// </summary>
+ public bool CookieSecurePolicyAlways { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether use the default security headers for your application
+ /// </summary>
+ public bool UseDefaultSecurityHeaders { get; set; }
+
+ /// <summary>
+ /// HTTP Strict Transport Security Protocol
+ /// isn't recommended in development because the HSTS header is highly cacheable by browsers
+ /// </summary>
+ public bool UseHsts { get; set; }
+
+ /// <summary>
+ /// Enforce HTTPS in ASP.NET Core
+ /// </summary>
+ public bool UseHttpsRedirection { get; set; }
+
+ public int HttpsRedirectionRedirect { get; set; }
+ public int? HttpsRedirectionHttpsPort { get; set; }
+ }
+}
diff --git a/src/Core/Grand.Infrastructure/StartupBase.cs b/src/Core/Grand.Infrastructure/StartupBase.cs
index cb0d79ad3..5e291476e 100644
--- a/src/Core/Grand.Infrastructure/StartupBase.cs
+++ b/src/Core/Grand.Infrastructure/StartupBase.cs
@@ -192,6 +192,7 @@ namespace Grand.Infrastructure
//add AppConfig configuration parameters
var applicationConfig = services.StartupConfig<AppConfig>(configuration.GetSection("Application"));
var performanceConfig = services.StartupConfig<PerformanceConfig>(configuration.GetSection("Performance"));
+ var securityConfig = services.StartupConfig<SecurityConfig>(configuration.GetSection("Security"));
services.StartupConfig<HostingConfig>(configuration.GetSection("Hosting"));
services.StartupConfig<UrlRewriteConfig>(configuration.GetSection("UrlRewrite"));
services.StartupConfig<RedisConfig>(configuration.GetSection("Redis"));
@@ -212,7 +213,7 @@ namespace Grand.Infrastructure
CommonPath.WebHostEnvironment = hostingEnvironment.WebRootPath;
CommonPath.BaseDirectory = hostingEnvironment.ContentRootPath;
CommonHelper.CacheTimeMinutes = performanceConfig.DefaultCacheTimeMinutes;
- CommonHelper.CookieAuthExpires = applicationConfig.CookieAuthExpires > 0 ? applicationConfig.CookieAuthExpires : 24 * 365;
+ CommonHelper.CookieAuthExpires = securityConfig.CookieAuthExpires > 0 ? securityConfig.CookieAuthExpires : 24 * 365;
CommonHelper.IgnoreAcl = performanceConfig.IgnoreAcl;
CommonHelper.IgnoreStoreLimitations = performanceConfig.IgnoreStoreLimitations;
diff --git a/src/Tests/Grand.Business.Authentication.Tests/CookieAuthenticationServiceTests.cs b/src/Tests/Grand.Business.Authentication.Tests/CookieAuthenticationServiceTests.cs
index 5dfbe001c..03efbde92 100644
--- a/src/Tests/Grand.Business.Authentication.Tests/CookieAuthenticationServiceTests.cs
+++ b/src/Tests/Grand.Business.Authentication.Tests/CookieAuthenticationServiceTests.cs
@@ -24,7 +24,7 @@ namespace Grand.Business.Authentication.Tests
private Mock<IGroupService> _groupServiceMock;
private Mock<IUserFieldService> _userFieldServiceMock;
private DefaultHttpContext _httpContext;
- private AppConfig _config;
+ private SecurityConfig _config;
[TestInitialize()]
public void Init()
@@ -35,7 +35,7 @@ namespace Grand.Business.Authentication.Tests
_customerSettings = new CustomerSettings();
_groupServiceMock = new Mock<IGroupService>();
_userFieldServiceMock = new Mock<IUserFieldService>();
- _config = new AppConfig();
+ _config = new SecurityConfig();
_config.CookieClaimsIssuer = "grandnode";
_config.CookiePrefix = ".Grand.";
_cookieAuthService = new CookieAuthenticationService(_customerSettings, _customerServiceMock.Object, _groupServiceMock.Object, _userFieldServiceMock.Object, _httpAccessorMock.Object, _config);
diff --git a/src/Web/Grand.Web.Common/Infrastructure/ServiceCollectionExtensions.cs b/src/Web/Grand.Web.Common/Infrastructure/ServiceCollectionExtensions.cs
index 3dff90f30..4b4414268 100644
--- a/src/Web/Grand.Web.Common/Infrastructure/ServiceCollectionExtensions.cs
+++ b/src/Web/Grand.Web.Common/Infrastructure/ServiceCollectionExtensions.cs
@@ -44,7 +44,7 @@ namespace Grand.Web.Common.Infrastructure
/// Adds services required for anti-forgery support
/// </summary>
/// <param name="services">Collection of service descriptors</param>
- public static void AddAntiForgery(this IServiceCollection services, AppConfig config)
+ public static void AddAntiForgery(this IServiceCollection services, SecurityConfig config)
{
//override cookie name
services.AddAntiforgery(options =>
@@ -65,7 +65,7 @@ namespace Grand.Web.Common.Infrastructure
/// Adds services required for application session state
/// </summary>
/// <param name="services">Collection of service descriptors</param>
- public static void AddHttpSession(this IServiceCollection services, AppConfig config)
+ public static void AddHttpSession(this IServiceCollection services, SecurityConfig config)
{
services.AddSession(options =>
{
@@ -124,8 +124,8 @@ namespace Grand.Web.Common.Infrastructure
/// <param name="services">Collection of service descriptors</param>
public static void AddGrandAuthentication(this IServiceCollection services, IConfiguration configuration)
{
- var config = new AppConfig();
- configuration.GetSection("Application").Bind(config);
+ var securityconfig = new SecurityConfig();
+ configuration.GetSection("Security").Bind(securityconfig);
//set default authentication schemes
var authenticationBuilder = services.AddAuthentication(options =>
@@ -137,22 +137,22 @@ namespace Grand.Web.Common.Infrastructure
//add main cookie authentication
authenticationBuilder.AddCookie(GrandCookieAuthenticationDefaults.AuthenticationScheme, options =>
{
- options.Cookie.Name = config.CookiePrefix + GrandCookieAuthenticationDefaults.AuthenticationScheme;
+ options.Cookie.Name = securityconfig.CookiePrefix + GrandCookieAuthenticationDefaults.AuthenticationScheme;
options.Cookie.HttpOnly = true;
options.LoginPath = GrandCookieAuthenticationDefaults.LoginPath;
options.AccessDeniedPath = GrandCookieAuthenticationDefaults.AccessDeniedPath;
- options.Cookie.SecurePolicy = config.CookieSecurePolicyAlways ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
+ options.Cookie.SecurePolicy = securityconfig.CookieSecurePolicyAlways ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
});
//add external authentication
authenticationBuilder.AddCookie(GrandCookieAuthenticationDefaults.ExternalAuthenticationScheme, options =>
{
- options.Cookie.Name = config.CookiePrefix + GrandCookieAuthenticationDefaults.ExternalAuthenticationScheme;
+ options.Cookie.Name = securityconfig.CookiePrefix + GrandCookieAuthenticationDefaults.ExternalAuthenticationScheme;
options.Cookie.HttpOnly = true;
options.LoginPath = GrandCookieAuthenticationDefaults.LoginPath;
options.AccessDeniedPath = GrandCookieAuthenticationDefaults.AccessDeniedPath;
- options.Cookie.SecurePolicy = config.CookieSecurePolicyAlways ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
+ options.Cookie.SecurePolicy = securityconfig.CookieSecurePolicyAlways ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
});
//register external authentication plugins now
@@ -184,10 +184,13 @@ namespace Grand.Web.Common.Infrastructure
//add razor runtime compilation
mvcBuilder.AddRazorRuntimeCompilation();
- var config = new AppConfig();
- configuration.GetSection("Application").Bind(config);
+ var securityConfig = new SecurityConfig();
+ configuration.GetSection("Security").Bind(securityConfig);
- if (config.UseHsts)
+ var appConfig = new AppConfig();
+ configuration.GetSection("Application").Bind(appConfig);
+
+ if (securityConfig.UseHsts)
{
services.AddHsts(options =>
{
@@ -196,16 +199,16 @@ namespace Grand.Web.Common.Infrastructure
});
}
- if (config.UseHttpsRedirection)
+ if (securityConfig.UseHttpsRedirection)
{
services.AddHttpsRedirection(options =>
{
- options.RedirectStatusCode = config.HttpsRedirectionRedirect;
- options.HttpsPort = config.HttpsRedirectionHttpsPort;
+ options.RedirectStatusCode = securityConfig.HttpsRedirectionRedirect;
+ options.HttpsPort = securityConfig.HttpsRedirectionHttpsPort;
});
}
//use session-based temp data provider
- if (config.UseSessionStateTempDataProvider)
+ if (appConfig.UseSessionStateTempDataProvider)
{
mvcBuilder.AddSessionStateTempDataProvider();
}
diff --git a/src/Web/Grand.Web.Common/Startup/GrandCommonStartup.cs b/src/Web/Grand.Web.Common/Startup/GrandCommonStartup.cs
index 6ff288c6e..25cedfc4d 100644
--- a/src/Web/Grand.Web.Common/Startup/GrandCommonStartup.cs
+++ b/src/Web/Grand.Web.Common/Startup/GrandCommonStartup.cs
@@ -24,8 +24,8 @@ namespace Grand.Web.Common.Startup
/// <param name="configuration">Configuration root of the application</param>
public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
- var config = new AppConfig();
- configuration.GetSection("Application").Bind(config);
+ var securityconfig = new SecurityConfig();
+ configuration.GetSection("Security").Bind(securityconfig);
//add settings
services.AddSettings();
@@ -37,10 +37,10 @@ namespace Grand.Web.Common.Startup
services.AddOptions();
//add HTTP sesion state feature
- services.AddHttpSession(config);
+ services.AddHttpSession(securityconfig);
//add anti-forgery
- services.AddAntiForgery(config);
+ services.AddAntiForgery(securityconfig);
//add localization
services.AddLocalization();
@@ -74,23 +74,24 @@ namespace Grand.Web.Common.Startup
var serviceProvider = application.ApplicationServices;
var appConfig = serviceProvider.GetRequiredService<AppConfig>();
var performanceConfig = serviceProvider.GetRequiredService<PerformanceConfig>();
+ var securityConfig = serviceProvider.GetRequiredService<SecurityConfig>();
//add HealthChecks
application.UseGrandHealthChecks();
//default security headers
- if (appConfig.UseDefaultSecurityHeaders)
+ if (securityConfig.UseDefaultSecurityHeaders)
{
application.UseDefaultSecurityHeaders();
}
//use hsts
- if (appConfig.UseHsts)
+ if (securityConfig.UseHsts)
{
application.UseHsts();
}
//enforce HTTPS in ASP.NET Core
- if (appConfig.UseHttpsRedirection)
+ if (securityConfig.UseHttpsRedirection)
{
application.UseHttpsRedirection();
}
diff --git a/src/Web/Grand.Web/App_Data/appsettings.json b/src/Web/Grand.Web/App_Data/appsettings.json
index 22b08dc98..6cbd892ad 100644
--- a/src/Web/Grand.Web/App_Data/appsettings.json
+++ b/src/Web/Grand.Web/App_Data/appsettings.json
@@ -16,16 +16,7 @@
"DisplayFullErrorStack": true,
//Value of "Cache-Control" header value for static content
"StaticFilesCacheControl": "public,max-age=31536000",
-
- //This settings adds the following headers to all responses that pass
- //X-Content-Type-Options: nosniff
- //Strict-Transport-Security: max-age=31536000; includeSubDomains
- //X-Frame-Options: Deny
- //X-XSS-Protection: 1; mode=block
- //Referrer-Policy: strict-origin-when-cross-origin
- //Content-Security-Policy: object-src 'none'; form-action 'self'; frame-ancestors 'none'
- "UseDefaultSecurityHeaders": false,
-
+
//Disable upload extensions plugins/themes
"DisableUploadExtensions": false,
//A list of plugins to be ignored during start application - pattern
@@ -34,14 +25,6 @@
//Ignore the migration process
"SkipMigrationProcess": false,
- //HTTP Strict Transport Security Protocol
- "UseHsts": false,
-
- //We recommend all ASP.NET Core web apps call HTTPS Redirection Middleware to redirect all HTTP requests to HTTPS
- "UseHttpsRedirection": false,
- "HttpsRedirectionRedirect": 308,
- "HttpsRedirectionHttpsPort": 443,
-
//Enable the session-based TempData provider
"UseSessionStateTempDataProvider": false,
@@ -49,22 +32,6 @@
//https://github.com/dotnet/roslyn/wiki/Roslyn-Overview
"UseRoslynScripts": false,
-
-
- //Gets or sets a value indicating for cookie auth expires in hours - default 24 * 365 = 8760
- "CookieAuthExpires": 8760,
-
- //Gets or sets a value for cookie prefix - any changes will log out all of the customers
- "CookiePrefix": ".Grand.",
-
- //Gets or sets a value for cookie claim issuer - any changes will log out all of the customers
- "CookieClaimsIssuer": "grandnode",
-
- //CookieSecurePolicy.Always always sets the Secure flag
- //Always setting the Secure flag is the most restrictive and most secure option.
- //This is the one you should be targeting if your production environment fully runs on HTTPS
- "CookieSecurePolicyAlways": false,
-
//A value indicating whether SEO friendly URLs with multiple languages are enabled
"SeoFriendlyUrlsForLanguagesEnabled": false,
"SeoFriendlyUrlsDefaultCode": "en",
@@ -72,6 +39,7 @@
//Use my request localization culture
"UseRequestLocalization": false,
"DefaultRequestCulture": "en-US",
+
//sample list
"SupportedCultures": [ "en-US", "pl-PL" ],
//Indicates whether to disable hosted service - BackgroundServiceTask
@@ -85,6 +53,39 @@
//(Serilog) Request logging - The package includes middleware for smarter HTTP request logging.
"UseSerilogRequestLogging": false
},
+ "Security": {
+ //This settings adds the following headers to all responses that pass
+ //X-Content-Type-Options: nosniff
+ //Strict-Transport-Security: max-age=31536000; includeSubDomains
+ //X-Frame-Options: Deny
+ //X-XSS-Protection: 1; mode=block
+ //Referrer-Policy: strict-origin-when-cross-origin
+ //Content-Security-Policy: object-src 'none'; form-action 'self'; frame-ancestors 'none'
+ "UseDefaultSecurityHeaders": false,
+
+ //HTTP Strict Transport Security Protocol
+ "UseHsts": false,
+
+ //We recommend all ASP.NET Core web apps call HTTPS Redirection Middleware to redirect all HTTP requests to HTTPS
+ "UseHttpsRedirection": false,
+ "HttpsRedirectionRedirect": 308,
+ "HttpsRedirectionHttpsPort": 443,
+
+ //Gets or sets a value indicating for cookie auth expires in hours - default 24 * 365 = 8760
+ "CookieAuthExpires": 8760,
+
+ //Gets or sets a value for cookie prefix - any changes will log out all of the customers
+ "CookiePrefix": ".Grand.",
+
+ //Gets or sets a value for cookie claim issuer - any changes will log out all of the customers
+ "CookieClaimsIssuer": "grandnode",
+
+ //CookieSecurePolicy.Always always sets the Secure flag
+ //Always setting the Secure flag is the most restrictive and most secure option.
+ //This is the one you should be targeting if your production environment fully runs on HTTPS
+ "CookieSecurePolicyAlways": false
+ },
+
"Performance": {
//Flag for whether to enable html minification
"UseHtmlMinification": false,