Adding config file timestamp to X-Version header

Этот коммит содержится в:
=Corey Hulen
2015-09-16 09:37:20 -07:00
родитель 84c0b96e0b
Коммит 4e3896d7b1

Просмотреть файл

@@ -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 {