fix: main.go changes
This commit is contained in:
+11
-11
@@ -1263,7 +1263,7 @@ func checkAdminLogin(resp http.ResponseWriter, request *http.Request) {
|
|||||||
|
|
||||||
// Should run calculations
|
// Should run calculations
|
||||||
if len(org.SSOConfig.OpenIdAuthorization) > 0 {
|
if len(org.SSOConfig.OpenIdAuthorization) > 0 {
|
||||||
baseSSOUrl = shuffle.GetOpenIdUrl(request, *org)
|
baseSSOUrl, err = shuffle.GetOpenIdUrl(request, *org, user, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] Failed getting OpenID URL for org %s: %s", org.Name, err)
|
log.Printf("[ERROR] Failed getting OpenID URL for org %s: %s", org.Name, err)
|
||||||
}
|
}
|
||||||
@@ -5683,16 +5683,16 @@ func initHandlers() {
|
|||||||
r.HandleFunc("/api/v1/dashboards/{key}/widgets/{widget_id}", shuffle.HandleGetWidget).Methods("GET", "OPTIONS")
|
r.HandleFunc("/api/v1/dashboards/{key}/widgets/{widget_id}", shuffle.HandleGetWidget).Methods("GET", "OPTIONS")
|
||||||
|
|
||||||
// Need to add auth in pprof
|
// Need to add auth in pprof
|
||||||
// if strings.ToLower(os.Getenv("SHUFFLE_DEBUG_MEMORY")) == "true" || strings.ToLower(os.Getenv("DEBUG_MEMORY")) == "true" {
|
// if strings.ToLower(os.Getenv("SHUFFLE_DEBUG_MEMORY")) == "true" || strings.ToLower(os.Getenv("DEBUG_MEMORY")) == "true" {
|
||||||
// log.Printf("[DEBUG] Memory debugging is enabled on /debug/pprof")
|
// log.Printf("[DEBUG] Memory debugging is enabled on /debug/pprof")
|
||||||
// r.HandleFunc("/debug/pprof/", pprof.Index)
|
// r.HandleFunc("/debug/pprof/", pprof.Index)
|
||||||
// r.HandleFunc("/debug/pprof/heap", pprof.Handler("heap").ServeHTTP)
|
// r.HandleFunc("/debug/pprof/heap", pprof.Handler("heap").ServeHTTP)
|
||||||
// r.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
// r.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
||||||
// r.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
|
// r.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
|
||||||
// r.HandleFunc("/debug/pprof/trace", pprof.Trace)
|
// r.HandleFunc("/debug/pprof/trace", pprof.Trace)
|
||||||
// } else {
|
// } else {
|
||||||
// log.Printf("[DEBUG] Memory debugging is disabled. To enable, set SHUFFLE_DEBUG_MEMORY or DEBUG_MEMORY to true")
|
// log.Printf("[DEBUG] Memory debugging is disabled. To enable, set SHUFFLE_DEBUG_MEMORY or DEBUG_MEMORY to true")
|
||||||
// }
|
// }
|
||||||
|
|
||||||
r.Use(shuffle.RequestMiddleware)
|
r.Use(shuffle.RequestMiddleware)
|
||||||
http.Handle("/", r)
|
http.Handle("/", r)
|
||||||
|
|||||||
Reference in New Issue
Block a user