pub fn parse_x_forwarded_proto(value: &[u8]) -> Result<Proto, ParseError>Expand description
Parses X-Forwarded-Proto: a URI scheme, case-insensitive (Proto
names http, https, ws, and wss); a comma list only when every
member is the same.
§Errors
§Examples
use parse_net::forwarded::{parse_x_forwarded_proto, Proto};
assert_eq!(parse_x_forwarded_proto(b"HTTPS")?, Proto::Https);
assert!(parse_x_forwarded_proto(b"https, http").is_err());