aboutsummaryrefslogtreecommitdiff
path: root/weed/admin/handlers/admin_handlers.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-10-24 12:48:59 -0700
committerGitHub <noreply@github.com>2025-10-24 12:48:59 -0700
commit9f4075441ca3adff84fd8a4d88b03330c35db951 (patch)
treeb4d4e6d09cdee0da398bc4be99ac333a56d09279 /weed/admin/handlers/admin_handlers.go
parentbf58c5a6880728961456e9123ae0b196474fe7e1 (diff)
downloadseaweedfs-9f4075441ca3adff84fd8a4d88b03330c35db951.tar.xz
seaweedfs-9f4075441ca3adff84fd8a4d88b03330c35db951.zip
[Admin UI] Login not possible due to securecookie error (#7374)
* [Admin UI] Login not possible due to securecookie error * avoid 404 favicon * Update weed/admin/dash/auth_middleware.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * address comments * avoid variable over shadowing * log session save error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Diffstat (limited to 'weed/admin/handlers/admin_handlers.go')
-rw-r--r--weed/admin/handlers/admin_handlers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/admin/handlers/admin_handlers.go b/weed/admin/handlers/admin_handlers.go
index 215e2a4e5..b1f465d2e 100644
--- a/weed/admin/handlers/admin_handlers.go
+++ b/weed/admin/handlers/admin_handlers.go
@@ -48,6 +48,11 @@ func (h *AdminHandlers) SetupRoutes(r *gin.Engine, authRequired bool, username,
// Health check (no auth required)
r.GET("/health", h.HealthCheck)
+ // Favicon route (no auth required) - redirect to static version
+ r.GET("/favicon.ico", func(c *gin.Context) {
+ c.Redirect(http.StatusMovedPermanently, "/static/favicon.ico")
+ })
+
if authRequired {
// Authentication routes (no auth required)
r.GET("/login", h.authHandlers.ShowLogin)