server: add X-Clacks-Overhead header
This commit is contained in:
parent
b792245f74
commit
1876477140
|
@ -168,6 +168,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
r.Header.Set("X-Request-Id", rid)
|
r.Header.Set("X-Request-Id", rid)
|
||||||
w.Header().Set("X-Request-Id", rid)
|
w.Header().Set("X-Request-Id", rid)
|
||||||
|
|
||||||
|
// http://www.gnuterrypratchett.com/
|
||||||
|
w.Header().Set("X-Clacks-Overhead", "GNU Terry Pratchett")
|
||||||
|
|
||||||
if strings.HasSuffix(r.Host, ".onion") {
|
if strings.HasSuffix(r.Host, ".onion") {
|
||||||
w.Header().Add("DNT", "1")
|
w.Header().Add("DNT", "1")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue