HTTP security headers
165-http-security-headers.yaml
Security
What this example does
HTTP security headers.
Checks and behavior
- Checks HSTS minimum max-age and absence of a debug header.
Replace example.com, documentation IPs, secrets and thresholds before production use.
YAML configuration
# Checks HSTS minimum max-age and absence of a debug header.
name: HTTP security headers
url: https://api.example.com/health
tests:
status: {allow: [200]}
security:
hsts_min_age: 31536000
headers:
absent: [X-Debug]
monitoring: {output: nagios, on_failure: critical}