We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86774fd commit f627352Copy full SHA for f627352
src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs
@@ -109,12 +109,11 @@ public void ConfigureServices(IServiceCollection services)
109
#endif
110
#if (OrganizationalAuth)
111
112
- services.AddRazorPages().AddMvcOptions(options =>
+ services.AddRazorPages();
113
+ services.AddAuthorization(options =>
114
{
- var policy = new AuthorizationPolicyBuilder()
115
- .RequireAuthenticatedUser()
116
- .Build();
117
- options.Filters.Add(new AuthorizeFilter(policy));
+ // By default, all incoming requests will be authorized according to the default policy
+ options.FallbackPolicy = options.DefaultPolicy;
118
});
119
#else
120
services.AddRazorPages();
0 commit comments