github.com/chenbh/concourse/v6@v6.4.2/atc/wrappa/versioned_handler.go (about) 1 package wrappa 2 3 import "net/http" 4 5 const concourseVersionHeader = "X-Concourse-Version" 6 7 type VersionedHandler struct { 8 Version string 9 Handler http.Handler 10 } 11 12 func (handler VersionedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 13 w.Header().Set(concourseVersionHeader, handler.Version) 14 handler.Handler.ServeHTTP(w, r) 15 }