Bundle that provides security tools.
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.
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(),
// ...
);
// ...
}
// ...
}
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
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 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 []
Developped with ❤️ by Norsys
This project is licensed under the MIT license.