Remove setting cookies secure to true
This commit is contained in:
@@ -160,12 +160,9 @@ func applyResponseHeader(w http.ResponseWriter, res *http.Response) {
|
|||||||
w.WriteHeader(res.StatusCode)
|
w.WriteHeader(res.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (router *Router) applyCookies(w http.ResponseWriter, res *http.Response) {
|
func applyCookies(w http.ResponseWriter, res *http.Response) {
|
||||||
cookies := res.Cookies()
|
cookies := res.Cookies()
|
||||||
for _, cookie := range cookies {
|
for _, cookie := range cookies {
|
||||||
if router.config.Server.Ssl.Enabled {
|
|
||||||
cookie.Secure = true
|
|
||||||
}
|
|
||||||
http.SetCookie(w, cookie)
|
http.SetCookie(w, cookie)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,7 +223,7 @@ func (router *Router) Route(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
router.applyCookies(w, res)
|
applyCookies(w, res)
|
||||||
applyResponseHeader(w, res)
|
applyResponseHeader(w, res)
|
||||||
|
|
||||||
// Exit early because its a redirect
|
// Exit early because its a redirect
|
||||||
|
|||||||
Reference in New Issue
Block a user