Merge branch 'master' into kd-live
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user