Documentation
¶
Overview ¶
Package httpsecurity holds transport policies with no framework dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidRequestID ¶
ValidRequestID accepts bounded correlation identifiers, never arbitrary header text.
func ValidateTLSFiles ¶
ValidateTLSFiles rejects a partially configured TLS identity. Both empty is allowed for a listener explicitly served behind a TLS-terminating proxy.
Types ¶
type AccessLog ¶
type AccessLog struct {
Time string `json:"time"`
ID string `json:"id"`
Status int `json:"status"`
Latency string `json:"latency"`
RemoteIP string `json:"remote_ip"` //nolint:tagliatelle // preserved snake_case log keys for log ingestion compatibility
Method string `json:"method"`
Host string `json:"host"`
Path string `json:"path"`
UserAgent string `json:"user_agent"` //nolint:tagliatelle // preserved snake_case log keys for log ingestion compatibility
Failed bool `json:"failed"`
BytesIn int `json:"bytes_in"` //nolint:tagliatelle // preserved snake_case log keys for log ingestion compatibility
BytesOut int `json:"bytes_out"` //nolint:tagliatelle // preserved snake_case log keys for log ingestion compatibility
}
AccessLog deliberately has no raw URL, query, headers, cookies, body or error message. Framework error strings can contain credentials and SQL arguments.
func (AccessLog) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.