Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

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

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

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

surgicalcoder opened this issue May 7, 2012 · 3 comments

Comments

@surgicalcoder
Copy link

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

@kristofferahl
Copy link
Owner

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.

@surgicalcoder
Copy link
Author

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

Sorry for the false alarm!

@kristofferahl
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants