mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Don't redirect login to migrate page (#453)
This commit is contained in:
@@ -383,7 +383,8 @@ func DatabaseCheckMiddleware(next http.Handler) http.Handler {
|
||||
ext := path.Ext(r.URL.Path)
|
||||
shouldRedirect := ext == "" && r.Method == "GET"
|
||||
if shouldRedirect && database.NeedsMigration() {
|
||||
if !strings.HasPrefix(r.URL.Path, "/migrate") {
|
||||
// #451 - don't redirect if loading login page
|
||||
if !strings.HasPrefix(r.URL.Path, "/migrate") && !strings.HasPrefix(r.URL.Path, "/login") {
|
||||
http.Redirect(w, r, "/migrate", 301)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user