pschinis / rails_same_site_cookie

Manages the new SameSite=None behavior for Rails apps that use cookie-based authentication for cross-domain requests
MIT License
107 stars 65 forks source link

Add `user_filter` to config to allow having lazy checks #15

Open ardeshireshghi opened 4 years ago

ardeshireshghi commented 4 years ago

config.user_filter is a lambda that receives env runtime and can decide to add sameSite or not

Bump to "0.2.0"

The rationale for adding this change is, the fact that we want to take into account other Rack environment variables such as other headers to decide whether we want to add the sameSite. For example, we might want to do this conditional to an existing header (IS-MOBILE-APPLICATION)