handlers/home: redirect w/ 303 instead of 301
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-05-11 04:55:56 +02:00
parent 847d4aab22
commit f80e06078a
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -17,7 +17,7 @@ func Home(client *ent.Client) echo.HandlerFunc {
sess, _ := session.Get(setting.SessionCookieName(), c) sess, _ := session.Get(setting.SessionCookieName(), c)
if sess == nil { if sess == nil {
log.Info("no session, redirecting to /signin", "endpoint", "/home") log.Info("no session, redirecting to /signin", "endpoint", "/home")
return c.Redirect(http.StatusMovedPermanently, "/signin") return c.Redirect(http.StatusSeeOther, "/signin")
} }
if sess.Values["foo"] != nil { if sess.Values["foo"] != nil {