From a94cfff9658d350bd0947e45c91e55b09a6aa644 Mon Sep 17 00:00:00 2001 From: henrygd Date: Tue, 11 Feb 2025 11:04:19 -0500 Subject: [PATCH] fix: web ui should only respond to get requests --- beszel/internal/hub/hub.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beszel/internal/hub/hub.go b/beszel/internal/hub/hub.go index ac130f4..189cae4 100644 --- a/beszel/internal/hub/hub.go +++ b/beszel/internal/hub/hub.go @@ -126,7 +126,7 @@ func (h *Hub) Run() { Scheme: "http", Host: "localhost:5173", }) - se.Router.Any("/{path...}", func(e *core.RequestEvent) error { + se.Router.GET("/{path...}", func(e *core.RequestEvent) error { proxy.ServeHTTP(e.Response, e.Request) return nil }) @@ -146,7 +146,7 @@ func (h *Hub) Run() { // get CSP configuration csp, cspExists := GetEnv("CSP") // add route - se.Router.Any("/{path...}", func(e *core.RequestEvent) error { + se.Router.GET("/{path...}", func(e *core.RequestEvent) error { // serve static assets if path is in staticPaths for i := range staticPaths { if strings.Contains(e.Request.URL.Path, staticPaths[i]) {