amalricbzh/tools-bundle

Common tools for Symfony website

Installs: 38

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:symfony-bundle

0.0.3 2024-01-07 13:24 UTC

This package is auto-updated.

Last update: 2024-04-07 13:59:58 UTC


README

Ce bundle embarque plusieurs outils ou réglages communs aux sites que je développe. Il n'a pas pour but d'embarquer de fonctionnalités. Je le complèterais au fur et à mesure de mes besoins.

Sécurité

Protection contre le ClickJacking

Ajout d'un header "X-Frame-Options: Deny".

Protection contre la lecture du cache du navigateur après la déconnection

Ecoute de l'évènement de déconnexion, et ajout d'un header Clear-Site-Data: cache

DEV : How to use a local version of this bundle

To work locally with this bundle:

  1. Create a lib subdirectory in your main project:

     mkdir lib
     cd lib
    
  2. Go in this lib directory and git clone the project:

    git clone https://gitlab.com/amalricbzh/tools-bundle.git
    
  3. Open your main project composer.json

  4. Replace amalricbzh/tools-bundle version with *@dev:
  "require": {
    ...
    "amalricbzh/tools-bundle": "*@dev",
    ...
   },
  1. Add the local path in the repositories section:
"repositories" : [
    {
      "type": "path",
      "url": "lib/ToolsBundle",
      "options": {
        "symlink": true
      }
    }
  ]
  1. Save the file and ask composer to use the local bundle. Open your application docker terminal and type:
     composer update amalricbzh/tools-bundle
    

NB : never commit these composer.json modifications !

That's all, your project now use the local bundle.