Created
November 17, 2019 23:20
-
-
Save aykuttasil/d5e344d17baad11966fed8b6cb815bb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.Configure<CookiePolicyOptions>(options => | |
{ | |
// This lambda determines whether user consent for non-essential cookies is needed for a given request. | |
options.CheckConsentNeeded = context => false; // <--------------- | |
options.MinimumSameSitePolicy = SameSiteMode.None; | |
}); | |
services.AddAntiforgery(o => o.SuppressXFrameOptionsHeader = true); | |
services.AddDistributedMemoryCache(); | |
services.AddSession(); | |
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment