File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,19 @@ pub struct AuthMiddleware<S> {
1919}
2020
2121async fn check ( auth_keys : Arc < AuthKeys > , mut req : Request ) -> Result < Request , Status > {
22+ // Allow health check endpoints to bypass authentication
23+ let path = req. uri ( ) . path ( ) ;
24+ if path == "/qdrant.Qdrant/HealthCheck" || path == "/grpc.health.v1.Health/Check" {
25+ // Set default full access for health check endpoints
26+ let access = Access :: full ( "Health check endpoints have full access without authentication" ) ;
27+ let inference_token = crate :: common:: inference:: InferenceToken ( None ) ;
28+
29+ req. extensions_mut ( ) . insert :: < Access > ( access) ;
30+ req. extensions_mut ( ) . insert ( inference_token) ;
31+
32+ return Ok ( req) ;
33+ }
34+
2235 let ( access, inference_token) = auth_keys
2336 . validate_request ( |key| req. headers ( ) . get ( key) . and_then ( |val| val. to_str ( ) . ok ( ) ) )
2437 . await
You can’t perform that action at this time.
0 commit comments