From f813308818e5c27572873a778066211cf3c56ee6 Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Tue, 2 Dec 2025 22:47:25 +0900 Subject: [PATCH] [fix](server): correct static asset routing for `/__hopgate_assets__/` - Fixed path prefix to ensure proper handling of `/__hopgate_assets__/` requests. - Adjusted `http.StripPrefix` to match the corrected route for consistent file serving. --- cmd/server/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 93933ad..8b73011 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -286,10 +286,10 @@ func newHTTPHandler(logger logging.Logger) http.Handler { // The /__hopgate_assets__/ path must always serve static assets independently // of DTLS/backend state. This handler is intended for the generic proxy path (/), // but as a safety net, we short-circuit asset requests here as well. (en) - if strings.HasPrefix(r.URL.Path, "/__hopgate_assets/") { + if strings.HasPrefix(r.URL.Path, "/__hopgate_assets__/") { if sub, err := stdfs.Sub(errorpages.AssetsFS, "assets"); err == nil { staticFS := http.FileServer(http.FS(sub)) - http.StripPrefix("/__hopgate_assets/", staticFS).ServeHTTP(w, r) + http.StripPrefix("/__hopgate_assets__/", staticFS).ServeHTTP(w, r) return } // embed FS 가 초기화되지 않은 비정상 상황에서는 500 에러 페이지로 폴백합니다. (ko)