Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note that upstream support is still pending [0] (and even when merged, this will require the latest Go version). So this adds a workaround to allow for setting SameSite on the cookies used, as per the draft [1]. Also changes the options_test TestCookieOptions calls to `t.Errorf`, since this will run all checks even if one fails. (`t.Fatal[f]` would stop test execution.) [0]: golang/go#15867 [1]: https://tools.ietf.org/html/draft-west-first-party-cookies-07 Signed-off-by: Stephan Renatus <srenatus@chef.io>
- Loading branch information
Showing
4 changed files
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ type options struct { | |
path string | ||
persist bool | ||
secure bool | ||
sameSite string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters