Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nucleos/nucleosgdprbundle
⚖️ This bundle provides a GDPR conform cookie information for symfony applications.
https://github.com/nucleos/nucleosgdprbundle
blocker bundle dsgvo floc gdpr sonata sonata-block symfony symfony-bundle
Last synced: about 1 month ago
JSON representation
⚖️ This bundle provides a GDPR conform cookie information for symfony applications.
- Host: GitHub
- URL: https://github.com/nucleos/nucleosgdprbundle
- Owner: nucleos
- License: mit
- Created: 2018-05-25T19:44:39.000Z (over 6 years ago)
- Default Branch: 2.8.x
- Last Pushed: 2024-09-30T00:50:44.000Z (about 2 months ago)
- Last Synced: 2024-10-10T13:04:00.621Z (about 1 month ago)
- Topics: blocker, bundle, dsgvo, floc, gdpr, sonata, sonata-block, symfony, symfony-bundle
- Language: PHP
- Homepage: https://nucleos.rocks
- Size: 2.9 MB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
NucleosGDPRBundle
=================
[![Latest Stable Version](https://poser.pugx.org/nucleos/gdpr-bundle/v/stable)](https://packagist.org/packages/nucleos/gdpr-bundle)
[![Latest Unstable Version](https://poser.pugx.org/nucleos/gdpr-bundle/v/unstable)](https://packagist.org/packages/nucleos/gdpr-bundle)
[![License](https://poser.pugx.org/nucleos/gdpr-bundle/license)](https://packagist.org/packages/nucleos/gdpr-bundle)[![Total Downloads](https://poser.pugx.org/nucleos/gdpr-bundle/downloads)](https://packagist.org/packages/nucleos/gdpr-bundle)
[![Monthly Downloads](https://poser.pugx.org/nucleos/gdpr-bundle/d/monthly)](https://packagist.org/packages/nucleos/gdpr-bundle)
[![Daily Downloads](https://poser.pugx.org/nucleos/gdpr-bundle/d/daily)](https://packagist.org/packages/nucleos/gdpr-bundle)[![Continuous Integration](https://github.com/nucleos/NucleosGDPRBundle/workflows/Continuous%20Integration/badge.svg?event=push)](https://github.com/nucleos/NucleosGDPRBundle/actions?query=workflow%3A"Continuous+Integration"+event%3Apush)
[![Code Coverage](https://codecov.io/gh/nucleos/NucleosGDPRBundle/graph/badge.svg)](https://codecov.io/gh/nucleos/NucleosGDPRBundle)
[![Type Coverage](https://shepherd.dev/github/nucleos/NucleosGDPRBundle/coverage.svg)](https://shepherd.dev/github/nucleos/NucleosGDPRBundle)This bundle provides a GDPR conform cookie information for symfony applications.
## Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
```
composer require nucleos/gdpr-bundle
```### Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles in `config/bundles.php` file of your project:
```php
// config/bundles.phpreturn [
// ...
Nucleos\NucleosGDPRBundle\NucleosGDPRBundle::class => ['all' => true],
];
```### Block cookies
By default all cookies are kept, also the cookie consent was not set.
To block all domain cookies, you can set the following config.```yaml
# config/packages/nucleos_gdpr.yamlnucleos_gdpr:
block_cookies: null
```You can define a list of cookies that are kept:
```yaml
# config/packages/nucleos_gdpr.yamlnucleos_gdpr:
block_cookies:
keep:
- PHPSESSID
- ADMIN_.*
```### Google FLoC (Federated Learning of Cohorts)
By default a `Permissions-Policy` header is added to every response to respect user privacy. You can enable Google FLoC tracking via the following configuration:
```yaml
# config/packages/nucleos_gdpr.yamlnucleos_gdpr:
privacy:
google_floc: true
```### Assets
It is recommended to use [webpack](https://webpack.js.org/) / [webpack-encore](https://github.com/symfony/webpack-encore)
to include the `GdprPopup.js` and `GdprPopup.css` file in your page. These files are located in the `assets` folder.## Usage
```twig
{# template.twig #}{{ sonata_block_render({ 'type': 'nucleos_gdpr.block.information' }, {
'url': 'https://example.com/gdpr',
'text': 'Example text' // optional
}) }}
```## License
This bundle is under the [MIT license](LICENSE.md).