Expand description
Environment variable constants for WiseGate configuration.
This module centralizes all environment variable names used by WiseGate, making it easy to document and maintain configuration options.
§Categories
- Proxy Security: Control trusted proxy IPs and validation
- Filtering: Block IPs, HTTP methods, and URL patterns
- Rate Limiting: Configure request limits and cleanup
- Proxy Behavior: Timeouts and size limits
§Example
export CC_REVERSE_PROXY_IPS="192.168.1.1,10.0.0.1"
export BLOCKED_IPS="malicious.ip.here"
export RATE_LIMIT_REQUESTS=100Constants§
- ALLOWED_
PROXY_ IPS - Comma-separated list of trusted proxy/load balancer IPs.
- BLOCKED_
IPS - Comma-separated list of blocked client IP addresses.
- BLOCKED_
METHODS - Comma-separated list of blocked HTTP methods.
- BLOCKED_
PATTERNS - Comma-separated list of blocked URL patterns.
- CC_
BEARER_ TOKEN - Bearer token for API authentication (RFC 6750).
- CC_
HTTP_ BASIC_ AUTH - HTTP Basic Authentication credentials.
- CC_
HTTP_ BASIC_ AUTH_ N - Additional HTTP Basic Authentication credentials (numbered).
- CC_
HTTP_ BASIC_ AUTH_ REALM - Custom realm for HTTP Basic Authentication.
- MAX_
BODY_ SIZE_ MB - Maximum request body size in megabytes.
- MAX_
CONNECTIONS - Maximum number of concurrent connections.
- PROXY_
TIMEOUT_ SECS - Timeout for upstream requests in seconds.
- RATE_
LIMIT_ CLEANUP_ INTERVAL_ SECS - Minimum interval between cleanup operations in seconds.
- RATE_
LIMIT_ CLEANUP_ THRESHOLD - Number of rate limit entries before triggering automatic cleanup.
- RATE_
LIMIT_ REQUESTS - Maximum requests allowed per IP within the time window.
- RATE_
LIMIT_ WINDOW_ SECS - Duration of the rate limiting window in seconds.
- TRUSTED_
PROXY_ IPS_ VAR - Alternative environment variable name for trusted proxy IPs.
Functions§
- all_
env_ vars - Returns a slice containing all environment variable names.