fix: return 404 on root path instead of redirecting to admin
Build and Push to GHCR / build-and-push (push) Has been cancelled

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
This commit is contained in:
Agent
2026-05-24 16:50:41 +08:00
co-authored by HAPI
parent bea74a6316
commit b730708446
+1 -1
View File
@@ -190,7 +190,7 @@ func buildHandler(cfg *config.Config) (*admin.Handler, http.Handler) {
// 根路径处理 // 根路径处理
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" { if r.URL.Path == "/" {
http.Redirect(w, r, adminPath+"/", http.StatusFound) http.NotFound(w, r)
return return
} }
authProxy.ServeHTTP(w, r) authProxy.ServeHTTP(w, r)