Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Ignore paths, ie. static content - css, images etc #20

Closed
surgicalcoder opened this Issue May 7, 2012 · 3 comments

Comments

Projects
None yet
2 participants

Hi All,

I currently have the following:

SecurityConfigurator.Configure(configuration =>
{
    configuration.GetAuthenticationStatusFrom(() => HttpContext.Current.User.Identity.IsAuthenticated);
    configuration.IgnoreMissingConfiguration();
    configuration.For<AccountController>().Ignore();
    configuration.For<HomeController>().DenyAnonymousAccess();
    configuration.For<ProjectsController>().DenyAnonymousAccess();
});

Is there any way to get it to ignore all requests to /css/ and /images/ ? The login page that I have currently has css and images that are being pulled from those directories, but from what I can tell, any and all requests to those paths get routed into the login page too!

Thanks!

Monty

Owner

kristofferahl commented May 8, 2012

So looking at the configuration I can see no reason why FluentSecurity would deny access to the mentioned resources.

  1. Have you made sure that the path to css and images are correct (in relation to the login page)?
  2. What is the result you get when trying to access a single resource (e.g. yourdomain.com/css/your.css?
  3. Are you using the section in your web.config?

I've never heard of this issue before so please let me know if you've solved this already.

I had a stray authorization section in the web.config, you're right!

Sorry for the false alarm!

Owner

kristofferahl commented May 10, 2012

No worries! Glad to hear that you got it all working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment