sklad: don't post-login redirect to POST requests

This commit is contained in:
Přemysl Eric Janouch 2019-04-14 21:25:55 +02:00
parent ea45784554
commit 39e2c5b76d
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func sessionWrap(inner func(http.ResponseWriter, *http.Request)) func(
w.Header().Set("Cache-Control", "no-store")
redirect := "/login"
if r.RequestURI != "/" {
if r.RequestURI != "/" && r.Method == http.MethodGet {
redirect += "?redirect=" + url.QueryEscape(r.RequestURI)
}