Workaround a bug causing Firefox 61-62 to reject responses with Content-Type = application/dns-message

This commit is contained in:
Star Brilliant
2018-07-02 19:42:57 +08:00
parent 7e7cd1ee90
commit 033865e508
2 changed files with 9 additions and 4 deletions
+1
View File
@@ -181,6 +181,7 @@ func (s *Server) generateResponseGoogle(w http.ResponseWriter, r *http.Request,
now := time.Now().UTC().Format(http.TimeFormat)
w.Header().Set("Date", now)
w.Header().Set("Last-Modified", now)
w.Header().Set("Vary", "Accept")
if respJSON.HaveTTL {
if req.isTailored {
w.Header().Set("Cache-Control", "private, max-age="+strconv.Itoa(int(respJSON.LeastTTL)))