Skip to content

Commit

Permalink
Merge pull request #12 from drybro/main
Browse files Browse the repository at this point in the history
Add SameSite attribute with the value Lax to cookie.
  • Loading branch information
drybro authored Sep 6, 2024
2 parents cf685b7 + 8c63d7e commit f76ba7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adaptive_image.module
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function adaptive_image_init() {
// the script

// No need for backdrop behaviours, jquery compatibility wrapper nor ready event
$js = "document.cookie='adaptive_image='+Math.max(screen.width,screen.height)+('devicePixelRatio' in window ? ','+devicePixelRatio : ',1')+'; path=/';";
$js = "document.cookie='adaptive_image='+Math.max(screen.width,screen.height)+('devicePixelRatio' in window ? ','+devicePixelRatio : ',1')+'; path=/; SameSite=Lax;'";
backdrop_add_js($js,
// First-come, first-served
array(
Expand Down

0 comments on commit f76ba7a

Please sign in to comment.