diff --git a/core/maingate.go b/core/maingate.go index e176a8b..e57657f 100644 --- a/core/maingate.go +++ b/core/maingate.go @@ -533,11 +533,11 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu return err } - fsx := http.FileServer(http.Dir("./console")) - serveMux.Handle(gocommon.MakeHttpHandlerPattern(prefix, "console/"), http.StripPrefix("/console/", fsx)) + cfsx := http.FileServer(http.Dir("console")) + serveMux.Handle(prefix+"/console/", http.StripPrefix(prefix+"/console/", cfsx)) - ssx := http.FileServer(http.Dir("./static")) - serveMux.Handle(gocommon.MakeHttpHandlerPattern(prefix, "static/"), http.StripPrefix("/static/", ssx)) + staticfs := http.FileServer(http.Dir("static")) + serveMux.Handle(prefix+"/static/", http.StripPrefix(prefix+"/static/", staticfs)) serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "request_login_url", AuthPlatformGoogle), mg.platform_google_get_login_url) serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "authorize", AuthPlatformGoogle), mg.platform_google_authorize)