internal/server: move quic to response headers

This commit is contained in:
Cadey Ratio 2017-12-11 19:04:46 -08:00
parent b69d98d29b
commit c2fbaa9da9
1 changed files with 1 additions and 2 deletions

View File

@ -166,8 +166,6 @@ func New(cfg Config) (*Server, error) {
func (s *Server) Director(r *http.Request) {
r.Header.Del("X-Forwarded-For")
r.Header.Del("X-Client-Ip")
r.Header.Add("Alt-Svc", fmt.Sprintf(`quic="%s"; ma=2592000; v="39"`, s.cfg.QuicAddr))
}
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@ -187,6 +185,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
rid := ulid.New().String()
r.Header.Set("X-Request-Id", rid)
w.Header().Set("X-Request-Id", rid)
w.Header().Add("Alt-Svc", fmt.Sprintf(`quic="%s"; ma=2592000; v="39"`, s.cfg.QuicAddr))
// http://www.gnuterrypratchett.com/
w.Header().Set("X-Clacks-Overhead", "GNU Ashlynn")