dmstr / yii2-cookie-consent

14 stars 3 forks source link

Cookie not set as secure and httpOnly #7

Open ajoudeh opened 3 years ago

ajoudeh commented 3 years ago

Hi,

Cookie not Secure & https not set. can you fix it?

Screen Shot 2020-09-30 at 4 03 50 PM
schmunk42 commented 3 years ago

@germanbisurgi @eluhr Has this to be handled in this extension or app config?

gb5256 commented 6 months ago

Any news on this one? I have the same question. Need to set secure and httponly for this cookie. Would be awesome to set it via the widget-config to what ever values necessary, like secure : 'lax, none, same-site' and httponly : 'true, fase".

schmunk42 commented 6 months ago

@germanbisurgi Ping...

germanbisurgi commented 6 months ago

yii2-cookie-consent uses dmstr/cookie-consent JavaScript library to manage cookies and UI elements (popups, checkboxes, etc).

An httpOnly cookie it's not available to JavaScript in the client and thus can not get or set the httpOnly cookies.

It has to be set from the server. I think this can be made with an AJAX request to a dedicated controller.