Create functional option for ctx.SetCookie #14

Merged
techknowlogick merged 5 commits from zeripath/macaron:refactor-set-cookie into master 2020-10-27 21:36:41 +00:00
Contributor

Allowing func(*http.Cookie) to be passed into the SetCookie call will allow us to extend SetCookie to set the SameSite attribute easily.

(This PR also does some slight cleanup to context.go fixing minor lint issues.)

Allowing `func(*http.Cookie)` to be passed into the SetCookie call will allow us to extend SetCookie to set the SameSite attribute easily. (This PR also does some slight cleanup to context.go fixing minor lint issues.)
zeripath added 2 commits 2020-10-21 07:54:49 +00:00
b7458f9e7b
run go fmt on codebase and fix linting of tree_test
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added 1 commit 2020-10-21 08:26:14 +00:00
e650b1b0d4
Add helper functions
Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick reviewed 2020-10-21 20:23:38 +00:00
Dismissed
cookie/helper.go Outdated
@ -0,0 +1,79 @@
// Copyright 2020 The Macaron Authors
//

Could you also add Gitea as well?

Could you also add Gitea as well?
Author
Contributor

done

done
zeripath marked this conversation as resolved
zeripath added 1 commit 2020-10-21 20:33:45 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing
3453d4d8a6
author attribution
Signed-off-by: Andrew Thornton <art27@cantab.net>
First-time contributor

@zeripath did you file a upstream pull?

or do we differ to mouch already?

@zeripath did you file a upstream pull? or do we differ to mouch already?
Author
Contributor

Didn't file an upstream PR as we don't use it but can do if preferred.

Didn't file an upstream PR as we don't use it but can do if preferred.
6543 approved these changes 2020-10-22 13:50:24 +00:00
Dismissed
First-time contributor

@zeripath creating a pull upstream would be nice, so we do not divide to mouch from it - if it get merged ... is another question :D

@zeripath creating a pull upstream would be nice, so we do not divide to mouch from it - if it get merged ... is another question :D
jolheiser approved these changes 2020-10-22 14:56:49 +00:00
Dismissed
zeripath force-pushed refactor-set-cookie from c956201ffa to 3453d4d8a6 2020-10-27 20:13:27 +00:00 Compare
zeripath added 1 commit 2020-10-27 20:15:11 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
ba86d121da
Merge branch 'master' into refactor-set-cookie
techknowlogick merged commit 0db5d45848 into master 2020-10-27 21:36:41 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.