Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NoAuthMiddleware (0.14 sec)

  1. cmd/metrics-router.go

    	authType := prometheusAuthType(strings.ToLower(env.Get(EnvPrometheusAuthType, string(prometheusJWT))))
    
    	auth := AuthMiddleware
    	if authType == prometheusPublic {
    		auth = NoAuthMiddleware
    	}
    
    	metricsRouter.Handle(prometheusMetricsPathLegacy, auth(metricsHandler()))
    	metricsRouter.Handle(prometheusMetricsV2ClusterPath, auth(metricsServerHandler()))
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Mon Jul 15 16:28:02 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. cmd/metrics.go

    				// we do not have to log this.
    				return
    			}
    		}
    		if closer, ok := enc.(expfmt.Closer); ok {
    			closer.Close()
    		}
    	})
    }
    
    // NoAuthMiddleware no auth middle ware.
    func NoAuthMiddleware(h http.Handler) http.Handler {
    	return h
    }
    
    // AuthMiddleware checks if the bearer token is valid and authorized.
    func AuthMiddleware(h http.Handler) http.Handler {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
Back to top