diff --git a/server/server.go b/server/server.go index d1becfd..a92683d 100644 --- a/server/server.go +++ b/server/server.go @@ -160,6 +160,10 @@ func (s *Server) onionPath(name string) string { return filepath.Join(s.cfg.TorDataDir, name) } +func (s *Server) Director(r *http.Request) { + +} + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { r.Header.Del("X-Forwarded-For") @@ -185,7 +189,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("X-Clacks-Overhead", "GNU Ashlynn") if strings.HasSuffix(r.Host, ".onion") { - w.Header().Add("DNT", "1") + r.Header.Add("DNT", "1") } if r.RequestURI == rpc.DefaultRPCPath { @@ -194,6 +198,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { } rp := &httputil.ReverseProxy{ + Director: s.Director, Transport: s.ts, FlushInterval: 1 * time.Second, }