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

Add explicit set method to contrib/cookies #1240

merged 1 commit into from Jan 30, 2017


None yet
2 participants

allenan commented Jan 24, 2017

This adds an explicit set method to contrib/cookies which allows you to override the default or application-wide cookie settings.

I was running into an issue where I wanted to set one cookie as HttpOnly, and allow one to be accessible via JavaScript. I didn't see an easy way to do that with the existing []= method. This way, if someone wants to set cookies with different options, they can pass them to the set method, and []= is defined in terms of set.

@allenan allenan changed the title from adds explicit set method to contrib/cookies to Add explicit set method to contrib/cookies Jan 24, 2017

@zzak zzak added the feature label Jan 30, 2017

@zzak zzak added this to the 2.0.0 milestone Jan 30, 2017


This comment has been minimized.

Show comment
Hide comment

zzak Jan 30, 2017


/cc #1216


zzak commented Jan 30, 2017

/cc #1216

@zzak zzak merged commit 272fe3a into sinatra:master Jan 30, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment