(handler http.Handler)
| 16 | } |
| 17 | |
| 18 | func (server *Server) wrapHeaders(handler http.Handler) http.Handler { |
| 19 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 20 | // todo add version |
| 21 | w.Header().Set("Server", "GoTTY") |
| 22 | handler.ServeHTTP(w, r) |
| 23 | }) |
| 24 | } |
| 25 | |
| 26 | func (server *Server) wrapBasicAuth(handler http.Handler, credential string) http.Handler { |
| 27 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |