Available on crate feature
http only.Expand description
Header types for Fly- edge proxy request headers, like
Fly-Client-IP.
ⓘ
use axum::response::Html;
use axum_extra::TypedHeader;
use flytrap::http::{FlyClientIp, FlyRegion};
async fn ip(
TypedHeader(FlyClientIp(ip)): TypedHeader<FlyClientIp>,
TypedHeader(FlyRegion(edge)): TypedHeader<FlyRegion>,
) -> Html<String> {
Html(format!("Your IP: <code>{ip}</code> (via {edge})"))
}Structs§
- FlyClient
Ip - The
Fly-Client-IPheader: the IP address that Fly.io accepted the incoming connection from. - FlyForwarded
Port - The
Fly-Forwarded-Portheader: the port that the client connected to the Fly.io edge. - FlyRegion
- The
Fly-Regionheader: the Fly.io edge region where the client’s connection was accepted from the Internet.
Statics§
- FLY_
CLIENT_ IP - The name for the
Fly-Client-IPHTTP header. - FLY_
FORWARDED_ PORT - The name for the
Fly-Forwarded-PortHTTP header. - FLY_
REGION - The name for the
Fly-RegionHTTP header.