nystudio107 / craft-cookies

A simple plugin for setting and getting cookies from within Craft CMS templates.

Home Page:https://nystudio107.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookies are always forced to 'secure'

jedimonkey opened this issue · comments

Looks like when some changes were made 2 months ago to handle php7's setcookie parameter changes, secure was set to true and can't be changed.

https://github.com/nystudio107/craft-cookies/blob/v1/src/services/CookiesService.php#L62

Can this be fixed to be configurable?

PR for this issue #12

... is it possible to merge my PR?

I have the same issue, and this PR fixes it! Please merge #12 .

Just go stuck on this myself. Plugin doesn't work using non secure cookies.

@jsunsawyer Same for me - had been struggling to use the plugin until I found this issue. Making the change manually makes it work for now.

Same problem here. I can't use this plugin locally since I'm using http in my dev machine.

@khalwat is this intentional? Is there any reason why #12 can't be merged?

Thanks

Sure... sorry about that, I'll merge it in.

I think part of the reason is Craft's new default setting to to enable secure cookies by default if the protocol is https:

https://craftcms.com/docs/3.x/config/config-settings.html#usesecurecookies