athena_rs 3.3.0

Database gateway API
Documentation
1
2
3
4
5
6
7
8
9
10
//! Helpers for reading the `X-Organization-Id` header.
use actix_web::HttpRequest;

/// Returns the organizational identifier sent by the caller.
pub fn get_x_organization_id(req: &HttpRequest) -> Option<String> {
    req.headers()
        .get("X-Organization-Id")
        .and_then(|h| h.to_str().ok())
        .map(|s| s.to_string())
}