• crvv's avatar
    templates: Set right response Content-Type · 4a095590
    crvv authored
    If use gzip and templates at the same time, the response body will
    be gzipped data. And in this case, the Content-Type header won't be
    set by Caddy code. Then Go http package will set "Content-Type" to
    wrong value "application/x-gzip" which is determined by response body.
    So the header Contenty-Type should be set in templates middleware.
    4a095590
templates.go 2.71 KB