IAuthorizationFilter blocking Smidge route
See original GitHub issueWhen I try to use a IAuthorizationFilter implementation, I had to skip when context.RouteData?.Values["bundle"] != null
.
There is a solution for this? Maybe I did some misconfiguration?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
4.0.0 Milestone
A lightweight runtime CSS/JavaScript file minification, combination, compression & management library for ASP.Net Core - 4.0.0 Milestone ...
Read more >How to get ASP.NET MVC IAuthorizationFilter to respect ...
So I can navigate to /elmah to view my error logs. I have the following IgnoreRoute statements, so that MVC ignores the /elmah...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I Just published a new 4.0 beta release with the [AllowAnonymous] change if you want to check it out
https://www.nuget.org/packages/Smidge/4.0.0-beta.357 https://www.nuget.org/packages/Smidge.Nuglify/4.0.0-beta.357
So you are adding a global auth filter to all controllers which will include Smidge controllers and therefore the Smidge controllers will not execute.
A fix could be that we include the
[AllowAnonymous]
attribute on the smidge controller. I think this controller should always be publicly available since it’s just used for returning css/js.You should be able to determine the current controller executing in your route values too and could just check for “Smidge” as the controller name and exclude your authz.
Let me know what you think.