//! 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()
}
