In Delphi XE2 / Indy 10, I've been doing some work on a few Web Broker projects which include a web module capturing particular http requests, and if there's no particular matching request, it searches for a file from within a root directory. Now what I'm trying to do is implement security around certain files and file extensions, just like in a typical web server such as IIS.

Is there something in Indy or at least in Delphi XE2 which can manage this security? Or is it something I will have to encapsulate myself? Because I have a different method in each of my projects, and I'd rather there be a standard way to do it in all of them than to re-invent the wheel.