Skip to content

Commit

Permalink
Merge pull request #637 from squat/fix_cache_control
Browse files Browse the repository at this point in the history
server/handlers: fix Cache-Control header
  • Loading branch information
ericchiang authored Oct 26, 2016
2 parents 99e312e + 5c498ae commit 88896eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (s *Server) handlePublicKeys(w http.ResponseWriter, r *http.Request) {
maxAge = time.Minute * 2
}

w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%d, must-revalidate", maxAge))
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%d, must-revalidate", int(maxAge.Seconds())))
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Content-Length", strconv.Itoa(len(data)))
w.Write(data)
Expand Down

0 comments on commit 88896eb

Please sign in to comment.