2016-01-27 45 views
1

我想在播放框架配置中添加額外的安全標頭,但我的更改沒有得到體現。我通讀了劇本文檔,它說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

回答

0

Play的安全頭過濾器無法用於播放2.2.x中 它首次與Play 2.3一起推出

您可能正在查看最新的(2.4.x在撰寫本文時)文檔。

+0

是的你是對的。但是除了上面提到的5個之外,有沒有辦法添加額外的頭文件? –