Autoset secure cookie - #209
Closed
fracmak wants to merge 1 commit into
Closed
Conversation
Contributor
|
Hi! Can you add some documentation to the readme as well as make this opt-in behavior? |
Contributor
There was a problem hiding this comment.
This will never work when serving requests on parallel both secure and not, because you are altering global state that belongs to multiple requests at the same time. This will have to be fixed before we can accept the PR.
Contributor
Author
There was a problem hiding this comment.
ah, good catch, let me fix that
Contributor
|
Once the two issues are addressed, I think this is useful functionality that we can merge! |
fracmak
force-pushed
the
autoSecureCookie
branch
from
September 15, 2015 19:06
f518672 to
e620a3d
Compare
Contributor
Author
|
issues addressed |
…he trust proxy settings assuming the cookie secure option isn't already set
fracmak
force-pushed
the
autoSecureCookie
branch
from
September 15, 2015 20:32
e620a3d to
4e4ed80
Compare
Contributor
|
Thanks again! This has just been merged with a slight modification of simplifying the API to just be |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added ability to automatically set the secure cookie value based on the trust proxy settings when autoSecure option is set.
This is useful when you're working in mixed environments where you're developing locally in an insecure environment, but the higher environments are secure and you want to trust express's request.secure option for scoping your cookies.