Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Add SameSite support for NancyCookies #3006

Closed
wants to merge 1 commit into from

Conversation

0x414c49
Copy link

@0x414c49 0x414c49 commented Mar 10, 2020

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the Nancy code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

Nancy Cookies doesn't support SameSite property. This PR adds SameSite property to cookies. The possible values for SameSite property are defined by an enum SameSite.cs: Lax, Strict and None.

This change won't break anything, all cookies work as they suppose to work. All the tests are passed and two new tests added to cover the new functionality.

Fix #3002

@drewfreyling
Copy link

Nice work on the pr. I think setting the secure value to true automatically isn't the right approach. That should be user set. Not all browsers are doing the none+secure thing. Even if they were it makes the code more obvious if the user is setting it themselves.

@0x414c49
Copy link
Author

Nice work on the pr. I think setting the secure value to true automatically isn't the right approach. That should be user set. Not all browsers are doing the none+secure thing. Even if they were it makes the code more obvious if the user is setting it themselves.

Kinda agree with you. I will change to codes and push them.

SameSite property will accept Lax, Strict and None values.

Fix #3002
@0x414c49 0x414c49 closed this by deleting the head repository Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NancyCookie doesn't have support for SameSite changes
2 participants