title: Serving files with authorization in an Owin self hosted application
body: <p>I have a self hosted application using Owin and no ASP.MVC of any type, so there is no web.config in the application.</p>
  
  <p>I have enabled cookie authentication and my own authorization provider mechanism which works perfectly fine.
  My application serves some static contents using the the next code:</p>
  
  <pre><code>appBuilder.UseFileServer(new FileServerOptions()
  {
      RequestPath = new PathString("/Images"),
      FileSystem = new PhysicalFileSystem(@"./Images"),
  });
  </code></pre>
  
  <p>But that content is not protected by the Owin authentication, what would be the easiest way to protect the files? </p>
  
  <p>*ideally not having to implement the whole file serving myself.</p>