summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-16 09:37:20 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-16 09:37:20 -0700
commit4e3896d7b1911b8c184dee3c650461f0d3c0acea (patch)
tree8099faf0d1a78708c3960625e0d36f2819f344b5 /api/context.go
parent84c0b96e0b89e54d02c5bc0a10f383fa8559809b (diff)
downloadchat-4e3896d7b1911b8c184dee3c650461f0d3c0acea.tar.gz
chat-4e3896d7b1911b8c184dee3c650461f0d3c0acea.tar.bz2
chat-4e3896d7b1911b8c184dee3c650461f0d3c0acea.zip
Adding config file timestamp to X-Version header
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go3
1 files changed, 2 insertions, 1 deletions
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 {