firesphere/cspheaders 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

firesphere/cspheaders

最新稳定版本:3.0.0-rc2

Composer 安装命令:

composer require firesphere/cspheaders

包简介

Setup CSP Headers for a website

README 文档

README

License

LGPL v3 or later

Code status

Woodpecker-CI

Adds CSP headers to your request, based on configuration in a yml file.

Setting up a report-uri account is free and easy

Disclaimer

If this module breaks your website, you get to keep all the pieces.

Requirements

SilverStripe Framework 4.x+ PHP 8.0+

Installation

composer require firesphere/cspheaders

Configuration and usage

See the documentation

WARNING

When using this module and have CSS hashes or nonces enabled, any inline styles declared on HTML Elements themselves will not work anymore.

To enable or disable inline javascripts or css, set the appropriate flag (allow-inline) in your yml config.

Same goes for javascripts. Javascripts specifically should live either in a separate file, or be added using Requirementns::customScripts()

Default for css is therefore false, javascript however defaults to true for security reasons.

CDN Providers

When using Incapsula or Imperva (and potentially other CDN providers), your CSS and JavaScripts may be altered by the CDN, and therefore never compute correctly.

The only solution is to disable the SRI's for css and javascript on these providers.

.htaccess

Any header set in the .htaccess, Apache site.conf or nginx.conf files will override the headers set by this module.

Did you read this entire readme? You rock!

Pictured below is a cow, just for you.


               /( ,,,,, )\
              _\,;;;;;;;,/_
           .-"; ;;;;;;;;; ;"-.
           '.__/`_ / \ _`\__.'
              | (')| |(') |
              | .--' '--. |
              |/ o     o \|
              |           |
             / \ _..=.._ / \
            /:. '._____.'   \
           ;::'    / \      .;
           |     _|_ _|_   ::|
         .-|     '==o=='    '|-.
        /  |  . /       \    |  \
        |  | ::|         |   | .|
        |  (  ')         (.  )::|
        |: |   |;  U U  ;|:: | `|
        |' |   | \ U U / |'  |  |
        ##V|   |_/`"""`\_|   |V##
           ##V##         ##V##

统计信息

  • 总下载量: 35.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 2

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2018-12-15