Browse Source

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

master
Přemysl Janouch 1 year ago
parent
commit
39e2c5b76d
Signed by: Přemysl Janouch <p@janouch.name> GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      sklad/session.go

+ 1
- 1
sklad/session.go 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)
}


Loading…
Cancel
Save