diff --git a/core/dnsserver/server_https.go b/core/dnsserver/server_https.go index cddf59890..09c7d6200 100644 --- a/core/dnsserver/server_https.go +++ b/core/dnsserver/server_https.go @@ -188,7 +188,7 @@ func (s *ServerHTTPS) ServeHTTP(w http.ResponseWriter, r *http.Request) { age := dnsutil.MinimalTTL(dw.Msg, mt) w.Header().Set("Content-Type", doh.MimeType) - w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%f", age.Seconds())) + w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%d", uint32(age.Seconds()))) w.Header().Set("Content-Length", strconv.Itoa(len(buf))) w.WriteHeader(http.StatusOK) s.countResponse(http.StatusOK)