Monday 15 March 2010

security - Deny file access but server properly in IIS -


I have a JS file that is included in the master page

When I use the user in the browser address bar I type the link, I want to deny access to file access.

I have tried the URL filtering IIS, such as:

  & lt; Security & gt; & Lt; RequestFiltering & gt; & Lt; DenyUrlSequences & gt; & Lt; Add Sequence = "Scripts / Foo / Bar. Min. JS" /> & Lt; / DenyUrlSequences & gt; & Lt; / RequestFiltering & gt; & Lt; / Safety & gt;   

This works, when I type 'localhost': //blah/Scripts/Foo/bar.min.js' is blocked by me.

But it is important to delete the page because it can not render JS file.

Do anyone have an alternative solution? thank you in advanced!

100% is not fixed but I think there is no way to do this. When the browser provides your page, it actually sends the same request to the server, when you manually type in the JS file in the browser.

IIS does not

  1. Add any type of ID to your JS file such as this scripts / Foo / bar.min.js? ID = E3CF305B-4444-E011-8FD2-1CC1DEE89A7F
  2. ID time is limited and it has been made 20 seconds or later (enough time for browser)
  3. Creating a custom handler Which will parse the ID and decide whether the server should return the request

    so when any type of script / foo / bar min.js handler will reject the request, Will also end when requested ID is used.

    However It probably will be difficult to maintain and will be intense for your server.

    If you want to hide your JS file, why not? Why not fuse it.

No comments:

Post a Comment