Skip to content

Commit

Permalink
#156 improve static file content type detect on optional compression
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed May 17, 2018
1 parent 0b74ed3 commit e9b9a1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (s *staticManager) Serve(ctx *Context) error {
// Serve file
if fi.Mode().IsRegular() {
// `Cache-Control` header based on `cache.static.*`
if contentType, err := detectFileContentType(fi.Name(), fr); err == nil {
if contentType, err := detectFileContentType(fi.Name(), f); err == nil {
ctx.Res.Header().Set(ahttp.HeaderContentType, contentType)

// apply cache header if environment profile is `prod`
Expand Down

0 comments on commit e9b9a1a

Please sign in to comment.