From 4e3896d7b1911b8c184dee3c650461f0d3c0acea Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 09:37:20 -0700 Subject: Adding config file timestamp to X-Version header --- api/context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api/context.go') diff --git a/api/context.go b/api/context.go index 313eec189..5dcdfaf96 100644 --- a/api/context.go +++ b/api/context.go @@ -4,6 +4,7 @@ package api import ( + "fmt" "net" "net/http" "net/url" @@ -97,7 +98,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { c.setSiteURL(protocol + "://" + r.Host) w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId) - w.Header().Set(model.HEADER_VERSION_ID, utils.Cfg.ServiceSettings.Version) + w.Header().Set(model.HEADER_VERSION_ID, utils.Cfg.ServiceSettings.Version+fmt.Sprintf(".%v", utils.CfgLastModified)) // Instruct the browser not to display us in an iframe for anti-clickjacking if !h.isApi { -- cgit v1.2.3-1-g7c22