C#C
C#3y ago
barcode

Static files asp.net

Hello, in my app I have 2 middlewares that are ran before any request but I want to disable them for static files. These middlewares check for a token but i don't want to force the user to be authorized to access some images.

app.UseStaticFiles();
app.UseMiddleware<AuthMiddleware>();
app.UseMiddleware<AccessMiddleware>();


I can't find anything on documentation nor google how to do this. What is the correct way?
Was this page helpful?