firesphere / permissionheaders
为网站设置权限头
0.3.0
2024-07-11 04:56 UTC
Requires
- php: ^8.1
- silverstripe/framework: ^4|^5
- symfony/yaml: >=4
Suggests
- firesphere/cspheaders: Add and manage CSP headers from CMS and YML for the easiest way to manage and ensure your CSP headers are correct.
README
许可证
首先
在使用此模块将所有权限添加到您的应用程序之前,请确保您至少在基本水平上,了解权限头是什么。
https://mdn.org.cn/en-US/docs/Web/HTTP/Headers/Permissions-Policy
以及 CORS
https://mdn.org.cn/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
代码状态
根据配置的 yml 文件添加权限头到您的请求。
要求
SilverStripe 框架 4.x+ PHP 8.0+
安装
composer require firesphere/permissionheaders
配置和使用
启用您想要的选项
Firesphere\PermissionHeaders\Config\PermissionConfig:
permissions:
enabled: false
referrer: same-origin
frame-options: SAMEORIGIN
content-type-options: nosniff
CORS:
enabled: false
HSTS:
enabled: false
查看包含的 config.yml,了解如何使用策略的示例。
默认情况下是关闭的!
警告
在 .htaccess
、Apache site.conf
或 nginx.conf
文件中设置的任何头都将覆盖此模块设置的头。
您是否阅读了整个 README?太棒了!
下面有一头牛,专门为您。
/( ,,,,, )\
_\,;;;;;;;,/_
.-"; ;;;;;;;;; ;"-.
'.__/`_ / \ _`\__.'
| (')| |(') |
| .--' '--. |
|/ o o \|
| |
/ \ _..=.._ / \
/:. '._____.' \
;::' / \ .;
| _|_ _|_ ::|
.-| '==o==' '|-.
/ | . / \ | \
| | ::| | | .|
| ( ') (. )::|
|: | |; U U ;|:: | `|
|' | | \ U U / |' | |
##V| |_/`"""`\_| |V##
##V## ##V##