Fix the Bug in IE browser.

This commit is contained in:
zicla
2018-12-11 01:36:53 +08:00
parent 2f794f549f
commit 2027b2139c
3 changed files with 26 additions and 2 deletions

View File

@ -122,6 +122,12 @@ func (this *Router) ServeHTTP(writer http.ResponseWriter, request *http.Request)
path := request.URL.Path
if strings.HasPrefix(path, "/api") {
//对于IE浏览器会自动缓存因此设置不缓存Header.
writer.Header().Set("Pragma", "No-cache")
writer.Header().Set("Cache-Control", "no-cache")
writer.Header().Set("Expires", "0")
if CONFIG.Installed {
//已安装的模式