Expand description
HTTP header constants for WiseGate.
This module centralizes all HTTP header names used throughout the codebase, avoiding magic strings and ensuring consistency.
Constants§
- AUTHORIZATION
- Authorization header (for Basic Auth).
- CONNECTION
- Connection header (hop-by-hop).
- CONTENT_
LENGTH - Content-Length header.
- CONTENT_
TYPE - Content-Type header.
- FORWARDED
- Forwarded header (RFC 7239) - standardized proxy header.
- HOP_
BY_ HOP_ HEADERS - List of all hop-by-hop headers that should not be forwarded.
- HOST
- Host header.
- KEEP_
ALIVE - Keep-Alive header (hop-by-hop).
- PROXY_
AUTHENTICATE - Proxy-Authenticate header (hop-by-hop).
- PROXY_
AUTHORIZATION - Proxy-Authorization header (hop-by-hop).
- TE
- TE header (hop-by-hop).
- TRAILERS
- Trailers header (hop-by-hop).
- TRANSFER_
ENCODING - Transfer-Encoding header (hop-by-hop).
- UPGRADE
- Upgrade header (hop-by-hop).
- WWW_
AUTHENTICATE - WWW-Authenticate header (for 401 responses).
- X_
FORWARDED_ FOR - X-Forwarded-For header - contains the originating client IP.
- X_
REAL_ IP - X-Real-IP header - injected by WiseGate for upstream services.
Functions§
- is_
hop_ by_ hop - Check if a header is a hop-by-hop header that shouldn’t be forwarded.