Mailing List Archive

Apache2::Cookie and SameSite
Hi all,

I’d like to be able to set SameSite=Strict on a cookie generated using Apache2::Cookie, but if I simply try to set that parameter, I get the following error:

Can't locate object method "SameSite" via package "Apache2::Cookie”

Is it possible?

Many thanks,
Andrew.
Re: Apache2::Cookie and SameSite [ In reply to ]
On Sep 7, 2020, at 11:28 AM, Andrew Green <andrew@article7.co.uk> wrote:
> I’d like to be able to set SameSite=Strict on a cookie generated using Apache2::Cookie, but if I simply try to set that parameter, I get the following error:
>
> Can't locate object method "SameSite" via package "Apache2::Cookie”
>
> Is it possible?

Try the following:

$cookie->set_attr('SameSite' => 'strict');

Let me know if that works for you.

Regards,
Ed