Merge branch 'master' into kd-live

This commit is contained in:
2023-06-28 15:28:11 +09:00

View File

@ -533,11 +533,11 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu
return err return err
} }
fsx := http.FileServer(http.Dir("./console")) cfsx := http.FileServer(http.Dir("console"))
serveMux.Handle(gocommon.MakeHttpHandlerPattern(prefix, "console/"), http.StripPrefix("/console/", fsx)) serveMux.Handle(prefix+"/console/", http.StripPrefix(prefix+"/console/", cfsx))
ssx := http.FileServer(http.Dir("./static")) staticfs := http.FileServer(http.Dir("static"))
serveMux.Handle(gocommon.MakeHttpHandlerPattern(prefix, "static/"), http.StripPrefix("/static/", ssx)) 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, "request_login_url", AuthPlatformGoogle), mg.platform_google_get_login_url)
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "authorize", AuthPlatformGoogle), mg.platform_google_authorize) serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "authorize", AuthPlatformGoogle), mg.platform_google_authorize)