DirkPersky / typo3-dp_cookieconsent

TYPO3 Extension: Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)
GNU Affero General Public License v3.0
32 stars 27 forks source link

config value for lifetime of cookie #51

Closed CodeContent closed 4 years ago

CodeContent commented 4 years ago

Can you insert a config value for lifetime of the "dp_cookieconsent_status" cookie?

Or can I already set this via javascript? I did not get this to work. I did not find a way to set it.

DirkPersky commented 4 years ago

the latest commit ^^ can help you with it.

window.cookieconsent_options_cookie = {
    // This is the url path that the cookie 'name' belongs to. The cookie can only be read at this location
    path: '/',
    // This is the domain that the cookie 'name' belongs to. The cookie can only be read on this domain.
    //  - Guide to cookie domains - https://www.mxsasha.eu/blog/2014/03/04/definitive-guide-to-cookie-domains/
    domain: '',
    // The cookies expire date, specified in days (specify -1 for no expiry)
    expiryDays: 365,
    // If true the cookie will be created with the secure flag. Secure cookies will only be transmitted via HTTPS.
    secure: false
}

^^ you can set this global configs before