Security bundle
, (*1)
, (*2)
Bundle that provides security tools., (*3)
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:, (*4)
$ composer require norsys/security-bundle
This command requires you to have Composer installed globally, as explained
in the installation chapter
of the Composer documentation., (*5)
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:, (*6)
<?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, (*7)
To enable https redirect system :, (*8)
norsys_security:
    https_redirect: 
        enabled: true # default false
Proxy
This bundle provides a listener to set trusted proxies from environment variable., (*9)
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., (*10)
To configure system :, (*11)
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 :heart: by Norsys, (*12)
License
This project is licensed under the MIT license., (*13)