1
0
Fork 0
mirror of https://github.com/Luzifer/mondash.git synced 2024-12-23 04:21:18 +00:00

Include application version into response

This commit is contained in:
Knut Ahlers 2016-03-27 21:02:31 +02:00
parent d0d5587cd9
commit 593f0f9b17

View file

@ -21,6 +21,8 @@ var (
templates = make(map[string]*pongo2.Template)
store storage.Storage
cfg *config.Config
version string
)
func main() {
@ -60,6 +62,8 @@ func logHTTPRequest(h http.Handler) http.Handler {
start := time.Now().UnixNano()
w := NewLogResponseWriter(res)
w.Header().Set("X-Application-Version", version)
h.ServeHTTP(w, r)
d := (time.Now().UnixNano() - start) / 1000