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: 3 months 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 (almost 7 years ago)
- Default Branch: 2.8.x
- Last Pushed: 2025-01-28T05:09:13.000Z (4 months ago)
- Last Synced: 2025-01-31T04:32:07.280Z (4 months ago)
- Topics: blocker, bundle, dsgvo, floc, gdpr, sonata, sonata-block, symfony, symfony-bundle
- Language: PHP
- Homepage: https://nucleos.rocks
- Size: 2.79 MB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
WARNING: This repository is deprecated
======================================This project will no longer receive any updates.
You might use [klaro.js](https://github.com/klaro-org/klaro-js) instead.
NucleosGDPRBundle
=================
[](https://packagist.org/packages/nucleos/gdpr-bundle)
[](https://packagist.org/packages/nucleos/gdpr-bundle)
[](https://packagist.org/packages/nucleos/gdpr-bundle)[](https://packagist.org/packages/nucleos/gdpr-bundle)
[](https://packagist.org/packages/nucleos/gdpr-bundle)
[](https://packagist.org/packages/nucleos/gdpr-bundle)[](https://github.com/nucleos/NucleosGDPRBundle/actions?query=workflow%3A"Continuous+Integration"+event%3Apush)
[](https://codecov.io/gh/nucleos/NucleosGDPRBundle)
[](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).