Skip to content
Snippets Groups Projects
Commit 2b062e5d authored by esantangelo's avatar esantangelo
Browse files

Remove Static file authorization

parent 75460895
No related branches found
No related tags found
No related merge requests found
Pipeline #10654 passed
...@@ -116,13 +116,6 @@ namespace Tsi1.Api ...@@ -116,13 +116,6 @@ namespace Tsi1.Api
services.AddCors(); services.AddCors();
services.AddAuthorization(options =>
{
options.FallbackPolicy = new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.Build();
});
services.AddAuthentication(x => services.AddAuthentication(x =>
{ {
x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
...@@ -231,9 +224,6 @@ namespace Tsi1.Api ...@@ -231,9 +224,6 @@ namespace Tsi1.Api
app.UseCors(x => x.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); app.UseCors(x => x.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
app.UseAuthentication();
app.UseAuthorization();
var provider = new FileExtensionContentTypeProvider(); var provider = new FileExtensionContentTypeProvider();
app.UseStaticFiles(new StaticFileOptions() app.UseStaticFiles(new StaticFileOptions()
...@@ -244,6 +234,9 @@ namespace Tsi1.Api ...@@ -244,6 +234,9 @@ namespace Tsi1.Api
RequestPath = "/static" RequestPath = "/static"
}); });
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints => app.UseEndpoints(endpoints =>
{ {
endpoints.MapControllers(); endpoints.MapControllers();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment