athena_rs 1.1.0

Database gateway API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Retrieves the `X-Athena-Client` header that selects the Supabase/Postgres client.
use actix_web::HttpRequest;

/// Returns the header value used to decide which downstream client should handle the request.
pub fn x_athena_client(req: &HttpRequest) -> String {
    req.headers()
        .get("X-Athena-Client")
        .and_then(|h| h.to_str().ok())
        .map(str::trim)
        .unwrap_or("")
        .to_string()
}