unosquare / embedio

A tiny, cross-platform, module based web server for .NET
http://unosquare.github.io/embedio
Other
1.46k stars 176 forks source link

Static folder conflicting with my api route #484

Closed bleugateau closed 4 years ago

bleugateau commented 4 years ago

Hello,

I have a problem, I have the staticfolder conflicting with my api routes. In my specifications it is indicated the exact urls so I can't do otherwise.

If anyone has a small bypass or a fix, thanks in advance.

Here is the code for reproduce the bug =>

      private WebServer CreateWebServer()
      {
            return new WebServer(o => o
                    .WithUrlPrefix(this.addressUrl)
                    .WithMode(HttpListenerMode.EmbedIO)
                )
                .WithLocalSessionManager()
                .WithWebApi("/assets", m => m
                    .WithController<AssetController>()
                )
                .WithStaticFolder("/assets", "assets/", true, m => m
                    .WithContentCaching(true).WithDefaultExtension(".json")
                )
        }        

With kind regards

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.