Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies with a SameSite attribute cause a warning to be output #415

Open
jjensen-ebsco opened this issue Dec 17, 2019 · 2 comments
Open

Comments

@jjensen-ebsco
Copy link

The case statement in the parse function of the Cookie class does not expect the "SameSite" attribute of a cookie. Servers will send this attribute, which causes unnecessary output.

I believe that this can be temporarily fixed by adding an empty when clause before the else clause:

...
when 'samesite'
else
...

A proper fix should probably add an attr_accessor :samesite and other code to manage the potential values for the "SameSite" attribute.

@dv
Copy link

dv commented Jun 1, 2020

Since Ruby 2.5 there's the Warning module that one can use to customise Kernel#warn. The gem warning adds some extra utils.

We've used it as follows to silence this annoying line:

# Add to gemfile
gem `warnings`

# Add to your codebase:
Warning.ignore(/Unknown key: SameSite = Lax/)

@sroller
Copy link

sroller commented Sep 15, 2022

Since Ruby 2.5 there's the Warning module that one can use to customise Kernel#warn. The gem warning adds some extra utils.

We've used it as follows to silence this annoying line:

# Add to gemfile
gem `warnings`

# Add to your codebase:
Warning.ignore(/Unknown key: SameSite = Lax/)

works as long as you install "warning" and not "warnings"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants