로그 추가

This commit is contained in:
2023-06-28 16:45:18 +09:00
parent 70d775e0fc
commit 0898213aa8

View File

@ -534,10 +534,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)