From 6c755b49992da8f37162f48e5c9a970516edbd03 Mon Sep 17 00:00:00 2001 From: wlkjyy Date: Mon, 20 May 2024 15:46:02 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8a2301b..7ec32ce 100644 --- a/main.go +++ b/main.go @@ -38,8 +38,9 @@ func main() { // } http.Handle(contextPath+"/exec/", websocket.Handler(ExecContainer)) - http_dir := http.FileServer(http.Dir(*localPath)) - http.Handle(contextPath+"/", http.StripPrefix("/console/", http_dir)) + httpDir := http.FileServer(http.Dir(*localPath)) + //http.Handle(contextPath+"/", http.StripPrefix("/console/", http_dir)) + http.Handle(contextPath+"/", http.StripPrefix(contextPath+"/", httpDir)) // ä»…index.html if err := http.ListenAndServe(":"+*port, nil); err != nil {