Created
April 29, 2019 13:44
-
-
Save aykuttasil/434979505600cda99bd4b84ccfa048f1 to your computer and use it in GitHub Desktop.
Global Scope Filters
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 => true; | |
options.MinimumSameSitePolicy = SameSiteMode.None; | |
}); | |
services.AddMvc(options => | |
{ | |
options.Filters.Add(typeof(ResultFilterSampleAttribute)); | |
}) | |
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment