diff --git a/core/maingate.go b/core/maingate.go index 948cfbb..dc5d6ae 100644 --- a/core/maingate.go +++ b/core/maingate.go @@ -541,10 +541,14 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu } cfsx := http.FileServer(http.Dir("console")) - serveMux.Handle(prefix+"/console/", http.StripPrefix(prefix+"/console/", cfsx)) + pattern := gocommon.MakeHttpHandlerPattern(prefix, "console", "/") + serveMux.Handle(pattern, http.StripPrefix(pattern, cfsx)) + logger.Println("maingate console registered :", pattern) staticfs := http.FileServer(http.Dir("static")) - serveMux.Handle(prefix+"/static/", http.StripPrefix(prefix+"/static/", staticfs)) + pattern = gocommon.MakeHttpHandlerPattern(prefix, "static", "/") + serveMux.Handle(pattern, http.StripPrefix(pattern, staticfs)) + logger.Println("maingate static registered :", pattern) 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)