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

Add explicit set method to contrib/cookies #1240

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

allenan
Copy link
Contributor

@allenan 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 adds explicit set method to contrib/cookies 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
@zzak
Copy link
Member

zzak commented Jan 30, 2017

/cc #1216

@zzak zzak merged commit 272fe3a into sinatra:master Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants