From 39e2c5b76d264904d34aec3e67665de816dfec4a Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 14 Apr 2019 21:25:55 +0200 Subject: sklad: don't post-login redirect to POST requests --- sklad/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklad/session.go b/sklad/session.go index 0d0686a..02fe0b0 100644 --- a/sklad/session.go +++ b/sklad/session.go @@ -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) } -- cgit v1.2.3-70-g09d2