我试图在play框架配置中添加额外的安全标头,但我的更改没有得到反映。我通读了play文档,它说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
发布于 2016-02-10 23:10:38
Play的安全头过滤器在Play 2.2.x中不可用。它在Play 2.3中首次引入
您可能正在查看最新的文档(撰写本文时为2.4.x)。
https://stackoverflow.com/questions/35050268
复制相似问题