sklad: don't post-login redirect to POST requests
This commit is contained in:
parent
ea45784554
commit
39e2c5b76d
|
@ -51,7 +51,7 @@ func sessionWrap(inner func(http.ResponseWriter, *http.Request)) func(
|
||||||
w.Header().Set("Cache-Control", "no-store")
|
w.Header().Set("Cache-Control", "no-store")
|
||||||
|
|
||||||
redirect := "/login"
|
redirect := "/login"
|
||||||
if r.RequestURI != "/" {
|
if r.RequestURI != "/" && r.Method == http.MethodGet {
|
||||||
redirect += "?redirect=" + url.QueryEscape(r.RequestURI)
|
redirect += "?redirect=" + url.QueryEscape(r.RequestURI)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue