internal/server: move quic to response headers
This commit is contained in:
parent
b69d98d29b
commit
c2fbaa9da9
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue