static files - asp.net web api core 2.1 authentication scheme Bearer
static files - asp.net web api core 2.1 authentication scheme Bearer How can I avoid static files from being authenticated? For every request on a static file (images, .js, .css, etc) a message is logged with "AuthenticationScheme: "Bearer" was not authenticated.". Although the message is just logged when the configuration is set to debug, the resources wasted on this are just unnecessary. Everything works fine, I just want to avoid checking authentication on these requests. Is there a way to disabled this? I've tried several variations on where the authentication is set on the Configure method, but nothing worked. This is my current configuration: public void Configure(IApplicationBuilder app, IHostingEnvironment env) { var locOptions = app.ApplicationServices.GetService<IOptions<RequestLocalizationOptions>>(); app.UseRequestLocalization(locOptions.Value); if (env.IsDevelopment()) { app.UseDeveloperExc...
