Login fixes (#3555)

* Don't redirect /logout
* Improve login page styling on mobile
This commit is contained in:
WithoutPants
2023-03-20 09:42:48 +11:00
committed by GitHub
parent 88b3b87f01
commit 2b9f573b30
3 changed files with 21 additions and 3 deletions

View File

@@ -13,7 +13,10 @@ import (
"github.com/stashapp/stash/pkg/session"
)
const loginEndPoint = "/login"
const (
loginEndPoint = "/login"
logoutEndPoint = "/logout"
)
const (
tripwireActivatedErrMsg = "Stash is exposed to the public internet without authentication, and is not serving any more content to protect your privacy. " +
@@ -27,7 +30,7 @@ const (
func allowUnauthenticated(r *http.Request) bool {
// #2715 - allow access to UI files
return strings.HasPrefix(r.URL.Path, loginEndPoint) || r.URL.Path == "/css" || strings.HasPrefix(r.URL.Path, "/assets")
return strings.HasPrefix(r.URL.Path, loginEndPoint) || r.URL.Path == logoutEndPoint || r.URL.Path == "/css" || strings.HasPrefix(r.URL.Path, "/assets")
}
func authenticateHandler() func(http.Handler) http.Handler {