mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-09 16:10:01 +00:00
Include application version into response
This commit is contained in:
parent
d0d5587cd9
commit
593f0f9b17
1 changed files with 4 additions and 0 deletions
4
main.go
4
main.go
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue