[英]Adding security headers in play framework configuration
我試圖在播放框架配置中添加其他安全標頭,但我的更改未得到體現。 我通讀了播放文檔,並說play.filters.headers僅接受5個預定義的安全頭。
# Security headers filter configuration
headers {
# The X-Frame-Options header. If null, the header is not set.
frameOptions = "DENY"
# The X-XSS-Protection header. If null, the header is not set.
xssProtection = "1; mode=block"
# The X-Content-Type-Options header. If null, the header is not set.
contentTypeOptions = "nosniff"
# The X-Permitted-Cross-Domain-Policies header. If null, the header is not set.
permittedCrossDomainPolicies = "master-only"
# The Content-Security-Policy header. If null, the header is not set.
contentSecurityPolicy = "default-src 'self'"
}
如果我需要在配置中添加上述5個標題以外的其他標頭,該怎么辦。
播放版本為2.2.3
Play的安全標頭過濾器不適用於Play2.2.x。 它最初是在Play 2.3中引入的
您可能正在查看最新的文檔(撰寫本文時為2.4.x)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.