Comments (2)
I have had success with this by using a Route Group (in a Laravel 7 application) like this:
<?php
use \Statikbe\CookieConsent\CookieConsentMiddleware;
include 'web/admin.php';
Route::middleware([CookieConsentMiddleware::class])->group(function () {
include 'web/website.php';
});
My admin routes are excluded from consent. In config/cookie-consent.php
, I excluded the login page by using 'ignored_paths' => ['/login']
.
Result: all visitors see the consent, all admins do not.
from laravel-cookie-consent.
We've changed the way of handling the ignored paths:
Don't show modal on cookie policy page or other pages
If you don't want the modal to be shown on certain pages you can add the relative url to the ignored paths setting. This also accepts wildcards (see the Laravel Str::is() helper).
'ignored_paths => ['/en/cookie-policy', '/api/documentation*'];
from laravel-cookie-consent.
Related Issues (20)
- How recall modal with a simple link ? HOT 2
- Ignored paths HOT 1
- Question: How to configure with Facebook Pixel? HOT 1
- Ability to reject all? HOT 3
- GTM Configuration Issue HOT 1
- Unable to remove this package HOT 1
- Modals don't show up HOT 5
- Cookies still present after withdrawing consent HOT 7
- Allow navigation with essential cookies HOT 1
- Modal doesn't open - Bootstrap conflict? HOT 2
- CSS and JS files throw 500 errors HOT 1
- Set Secure and HttpOnly to true
- No hint path defined for [cookie-consent]. HOT 2
- Add support for Google Consent Mode
- Slack Trigger
- Consent mode v2
- Can't understand step 3 of "How to configure Google Tag Manager" HOT 2
- No page refresh after cookie consent given? HOT 6
- Unexpected parenthesis in the Cookie settings pop-up HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-cookie-consent.