Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dogado-group/laravel-cookie-manager
Provides a middleware to automatically set the correct SameSite and Secure attribute for cookies if the client and request supports it.
https://github.com/dogado-group/laravel-cookie-manager
cookie laravel middleware php7 php8 samesite secure
Last synced: 9 days ago
JSON representation
Provides a middleware to automatically set the correct SameSite and Secure attribute for cookies if the client and request supports it.
- Host: GitHub
- URL: https://github.com/dogado-group/laravel-cookie-manager
- Owner: dogado-group
- License: mit
- Created: 2021-06-23T13:40:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-02T15:54:12.000Z (about 3 years ago)
- Last Synced: 2025-01-09T21:38:53.972Z (13 days ago)
- Topics: cookie, laravel, middleware, php7, php8, samesite, secure
- Language: PHP
- Homepage: https://www.dogado.de
- Size: 21.5 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
dogado Cookie Manager for Laravel
===============[![phpunit](https://github.com/dogado-group/laravel-cookie-manager/actions/workflows/phpunit.yml/badge.svg)](https://github.com/dogado-group/laravel-cookie-manager/actions/workflows/phpunit.yml)
[![Coverage Status](https://coveralls.io/repos/github/dogado-group/laravel-cookie-manager/badge.svg?branch=main)](https://coveralls.io/github/dogado-group/laravel-cookie-manager?branch=main)
[![Total Downloads](https://poser.pugx.org/dogado/laravel-cookie-manager/downloads)](https://packagist.org/packages/dogado/laravel-cookie-manager)
[![Latest Stable Version](https://poser.pugx.org/dogado/laravel-cookie-manager/v/stable)](https://packagist.org/packages/dogado/laravel-cookie-manager)
[![Latest Unstable Version](https://poser.pugx.org/dogado/laravel-cookie-manager/v/unstable.png)](https://packagist.org/packages/dogado/laravel-cookie-manager)
[![License](https://poser.pugx.org/dogado/laravel-cookie-manager/license)](https://packagist.org/packages/dogado/laravel-cookie-manager)1. [Introduction](#introduction)
1. [Requirements](#requirements)
1. [Installation](#installation)
- [Configure your Kernel to use the middleware](#configure-your-kernel-to-use-the-middleware)## Introduction
A client library package for Laravel based projects, maintained by the [dogado GmbH](https://dogado.de).
It provides a middleware class that automatically transforms cookies to be
[`Secure`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) if the request is SSL
encrypted and, if the browser supports it, sets the
[`SameSite=None`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) attribute.To learn more about `SameSite` cookies and how to use them, check out the
[web.dev blog from Google](https://web.dev/samesite-cookies-explained/) or the
[Mozilla docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite).## Requirements
* php `^7.3` or `^8.0`
* `symfony/http-foundation` version `^5.3.7` or `^6.0`## Installation
```
composer require dogado/laravel-cookie-manager
```### Configure your Kernel to use the middleware
Add the following class to the appropriate Laravel kernel middleware configuration according to your requirements.
```
\Dogado\Laravel\CookieManager\Http\Middleware\SecureResponseCookies::class
```## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.