norsys/security-bundle
Composer 安装命令:
composer require norsys/security-bundle
包简介
Bundle that provides security tools
README 文档
README
Bundle that provides security tools.
Installation
Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require norsys/security-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Norsys\SecurityBundle\NorsysSecurityBundle(), // ... ); // ... } // ... }
HTTPS
This bundle provide a system to redirect all requests http to https
To enable https redirect system :
norsys_security: https_redirect: enabled: true # default false
Proxy
This bundle provides a listener to set trusted proxies from environment variable.
norsys_security: proxy: enabled: true # default false env_variable_name: 'TRUSTED_PROXIES_LIST' # default 'TRUSTED_PROXIES' env_variable_separator: ';' # default ',' trusted_header_set: 'HEADER_FORWARDED' # default 'HEADER_X_FORWARDED_ALL'
Coming Soon
Coming soon system display a 302 redirect page with coming soon message to all requests.
To configure system :
norsys_security: coming_soon: enabled: true # default false template: ::coming_soon.html.twig # default NorsysSecurityBundle::coming_soon.html.twig allowed_ips: ['245.187.56.58', '190.85.134.50'] # default []
Credits
Developped with ❤️ by Norsys
License
This project is licensed under the MIT license.
统计信息
- 总下载量: 106
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-07-16