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

Come up with a better way of setting cookies. #56

Closed
mattiasgrenfeldt opened this issue Aug 7, 2020 · 0 comments · Fixed by #67
Closed

Come up with a better way of setting cookies. #56

mattiasgrenfeldt opened this issue Aug 7, 2020 · 0 comments · Fixed by #67
Assignees
Labels
enhancement New feature or request v0.1

Comments

@mattiasgrenfeldt
Copy link
Contributor

mattiasgrenfeldt commented Aug 7, 2020

Currently, to set cookies on a response you have to use the safehttp.Header.SetCookie method which takes a http.Cookie. All other ways to modify header values block the modification of the Set-Cookie header.

I suggest that we remove the safehttp.Header.SetCookie method, implement a safehttp.Cookie type with safe defaults and add a SetCookie method to safehttp.ResponseWriter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v0.1
Projects
None yet
2 participants