I would be interested in disabling session cookies, too. Also there is a setting session.enabled in user/config/system.yaml, setting it to false throws an error (âServer Error ⌠0 - The Login plugin requires âsystem.sessionâ to be enabledâ). Since the login plugin is required if using the admin UI, itâs not possible to disable session cookies even for pages not containing any form.
However, it should be possible to suppress session cookies for regular web pages not containing forms, shouldnât it? Pages with forms such as login pages could override the session.enabled setting explicitly or implicitly.
Problem are restricted and contact pages in the yoursite.com domain still requiring session cookies. It would be possible to just enable session for those pages, but if I understand it correctly, code in the login plugin has to be changed for this, since the login plugin checks for the session.enabled setting globally (file user/plugins/login/login.php, lines 69-72).
Finally I just commented âthrow new \RuntimeException(âThe Login plugin requires âsystem.sessionâ to be enabledâ);â on line 81 (file user/plugins/login/login.php) and set session.enabled to false in user/config/system.yaml.
In fact the system only checks if session is enabled to get âan authorizationâ.
If you donât check system.session, the login plugin will create the session too.
I also am interested in creating a cookie-free site (because I donât see why it would need one and GDPR makes cookies a bit of a hassle). I just tried what you suggested @arank, but the grav-site cookie still pops up again. I tried clearing the cache but to no avail. How do I get rid of that cookie?
EDIT: I am so sorry! I uploaded it into the wrong directory⌠Now thatâs fixed, the cookie is gone and everything is working like a charm. So thank you very much @arank!
I tried this because I only want cookies when login plugin is being used and not for anonymous users, but ticking box remember me results in error page and not ticking it doesnât get you logged in. Am i missing something here?
The reason I want this is because I am picking a fight with VarnishâŚas a trial-and-error-dude I really shouldnât, but I canât let go