#header #http-header #http #security #owasp #response-headers #best-practices

owasp-headers

为Rust提供最佳实践的OWASP HTTP响应头(https://owasp.org/www-project-secure-headers/ )

3个版本

0.1.2 2021年11月26日
0.1.1 2021年11月25日
0.1.0 2021年11月25日

#949 in HTTP服务器

MIT许可证

10KB
106

owasp-headers-rs 状态 Gitlab管道状态 Crates.io docs.rs

为Rust提供最佳实践的OWASP HTTP响应头( https://owasp.org/www-project-secure-headers/

头信息

HTTP-Strict-Transport-Security = "max-age=31536000 ; includeSubDomains"
X-Frame-Options = "deny"
X-Content-Type-Options = "nosniff"
Content-Security-Policy = "default-src 'self'; object-src 'none'; child-src 'self'; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content"
X-Permitted-Cross-Domain-Policies = "none"
Referrer-Policy = "no-referrer"
Clear-Site-Data = "\"cache\",\"cookies\",\"storage\""
Cross-Origin-Embedder-Policy = "require-corp"
Cross-Origin-Opener-Policy = "same-origin"
Cross-Origin-Resource-Policy = "same-origin"
Permissions-Policy = "accelerometer=(),autoplay=(),camera=(),display-capture=(),document-domain=(),encrypted-media=(),fullscreen=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),midi=(),payment=(),picture-in-picture=(),publickey-credentials-get=(),screen-wake-lock=(),sync-xhr=(self),usb=(),web-share=(),xr-spatial-tracking=()"
Cache-Control = "no-store, max-age=0"
Pragma = "no-cache"

另请参阅

依赖项

~575KB