Closed macpatel40 closed 5 years ago
Not sure why you made this issue with fasthttprouter
seen as you're not using this package at all.
I'm guessing imgPrefix
and cssPrefix
are defined somewhere else otherwise it doesn't even compile.
Your m
closure only calls the idx
function if the path is exactly /
but then the idx
function tries to match it with all kinds of paths.
In the idx
function sets text/css
as default content type while it then always serves a .html
file.
I think this is not a fasthttprouter
related issue too. Thanks to @erikdubbelboer .
I'm using Parseglobe and ExecuteTemplate with ctx. However, I need to setup fileserver where each html, css, and img file get their respective header (such as text/html, text/css, image/jpg etc) so that they don't show up as a plain text. I tried the following code but failed. Any help would he appreciated :)