-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcookies_consent.php
70 lines (69 loc) · 2.95 KB
/
cookies_consent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
return [
/**
* This prefix will be applied when setting and getting all cookies.
* If not set, the cookies will not be prefixed.
* If set, a good strategy is to also add a trailing underscore "_", that will be added between the field value, and each cookie.
* For example, if `cookie_prefix` is set to `my_app_`, then the cookies will be stored in a JSON object with the key `my_app_cookies_consent_selection`.
* Example:
*
* {
* "my_app_cookies_consent_selection": {
* "strictly_necessary": true,
* "performance": false,
* "targeting": false
* }
* }
*/
'cookie_prefix' => 'my_app_',
'display_floating_button' => true, // Set to false to display the footer link instead
'hide_floating_button_on_mobile' => false, // Set to true to hide the floating button on mobile
'use_separate_page' => false, // Set to true to use a separate page for cookies explanation
'categories_collapsed_by_default' => true, // Set to false to initially collapse the optional categories
'cookie_policy_page_custom_url' => null, // Set the custom page URL if use_separate_page is set to true and you want to use a custom URL or Laravel route
'use_floating_modal' => false, // Set to false to disable the use of showModal() on the dialog HTML element
/*
|--------------------------------------------------------------------------
| Editor
|--------------------------------------------------------------------------
|
| Choose your preferred cookies to be shown. You can add more cookies as desired.
|
| Built-in: "strictly_necessary"
|
*/
'cookies' => [
'strictly_necessary' => [
[
// you need to change this in order to reflect the cookie_prefix from above
'name' => 'my_app_cookies_consent',
'description' => 'cookies_consent::messages.cookie_cookies_consent_description',
'duration' => 'cookies_consent::messages.years',
'duration_count' => 1,
'policy_external_link' => null,
],
[
'name' => 'XSRF-TOKEN',
'description' => 'cookies_consent::messages.cookie_xsrf_token_description',
'duration' => 'cookies_consent::messages.hours',
'duration_count' => 2,
'policy_external_link' => null,
],
[
'name' => 'laravel_session',
'description' => 'cookies_consent::messages.cookie_laravel_session_description',
'duration' => 'cookies_consent::messages.hours',
'duration_count' => 2,
'policy_external_link' => null,
],
],
],
'enabled' => [
'strictly_necessary',
],
'required' => ['strictly_necessary'],
/*
* Set the cookie duration in days. Default is 365 days.
*/
'cookie_lifetime' => 365,
];