.kanban/MESAFIBACKLOG/tasks/remove-static-file-controller.md
2024-06-03 07:25:11 -07:00

684 B

assigned, progress, completed, type
assigned progress completed type
1 2023-05-27T00:00:00.000Z note

Remove StaticFile Controller

_ = config.Routes.MapHttpRoute("Static", "{*url}", new { controller = "StaticFiles", action = "Index" });

public class StaticFilesController : ApiController
{
   [HttpGet]
   public HttpResponseMessage Index(string url)
   {
       if (string.IsNullOrWhiteSpace(url))
           url = "index.html";

       //var path = GeneratePath(url);
       var response = new HttpResponseMessage();
       //response.Content = new StringContent(File.ReadAllText(path));
       //response.Content.Headers.ContentType = ContentType(url);
       return response;
   }
}