This commit is contained in:
deepzz0
2016-10-02 19:12:47 +08:00
parent 34cc239e83
commit 76134cee10
19 changed files with 21 additions and 3420 deletions

6
api.go
View File

@@ -380,9 +380,9 @@ func responseNotice(c *gin.Context, typ, content, hl string) {
domain = domain[0:i]
}
if hl != "" {
c.SetCookie("notice_highlight", hl, 86400, "/", domain, runmode.EnableHttps, false)
c.SetCookie("notice_highlight", hl, 86400, "/", domain, true, false)
}
c.SetCookie("notice_type", typ, 86400, "/", domain, runmode.EnableHttps, false)
c.SetCookie("notice", fmt.Sprintf("[\"%s\"]", content), 86400, "/", domain, runmode.EnableHttps, false)
c.SetCookie("notice_type", typ, 86400, "/", domain, true, false)
c.SetCookie("notice", fmt.Sprintf("[\"%s\"]", content), 86400, "/", domain, true, false)
c.Redirect(http.StatusFound, c.Request.Referer())
}