agentejo / cockpit

Add content management functionality to any site - plug & play / headless / api-first CMS
http://getcockpit.com
MIT License
5.39k stars 523 forks source link

Improve cookie helper: add samesite parameter #1463

Closed abernh closed 2 years ago

abernh commented 2 years ago

Problem

With the current Cookie::set() method the parameter "samesite" can not be set for a cookie.

Solution

Added additional parameter "samesite" and use the new setcookie(name, val, options) (since PHP7.3) method

Note

Also renamed misspelled coockie helper reference in Lime\App: 'coockie' --> 'cookie'

aheinze commented 2 years ago

Thanks!

wiedaw commented 2 years ago

@abernh how can I set secure flag for cookie?