Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Created November 10, 2021 20:34
Show Gist options
  • Save JoshCheek/26a7a6f3dbe8a2d14c3abfcbd492c268 to your computer and use it in GitHub Desktop.
Save JoshCheek/26a7a6f3dbe8a2d14c3abfcbd492c268 to your computer and use it in GitHub Desktop.
Oh my fucking god, setting the session cookie's SameSite attribute is...
utterly unclear. I thiiiiiiiiiiink you do this, but got timeboxed :P
soooo, moving on with my fkn life
```ruby
config.session_store :cookie_store,
key: "_nuvocargo_session",
secure: true, # I think :shrug:
same_site: lambda { |req, res|
# I think this should set it to "None" when the request comes from https://deploy-preview-$PR_NUMBER--nuvo-internal-stage.netlify.app
puts "I AM IN THE PROC"
x = "None"
binding.pry
x
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment