Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

secureProxy option added #16

Merged
merged 1 commit into from over 1 year ago

2 participants

Michael Wittig Jed Schmidt
Michael Wittig

Relates to #15

Jed Schmidt jed merged commit 4f8d442 into from September 13, 2012
Jed Schmidt jed closed this September 13, 2012
Jed Schmidt
Owner

thanks, @michaelwittig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 13, 2012
Michael Wittig added secureProxy option 1a90216
This page is out of date. Refresh to see the latest.
3  README.md
Source Rendered
@@ -59,6 +59,7 @@ If the _options_ object is provided, it will be used to generate the outbound co
59 59
 * `path`: a string indicating the path of the cookie (`/` by default).
60 60
 * `domain`: a string indicating the domain of the cookie (no default).
61 61
 * `secure`: a boolean indicating whether the cookie is only to be sent over HTTPS (`false` by default for HTTP, `true` by default for HTTPS).
  62
+* `secureProxy`: a boolean indicating whether the cookie is only to be sent over HTTPS (use this if you handle SSL not in your node process).
62 63
 * `httpOnly`: a boolean indicating whether the cookie is only to be sent over HTTP(S), and not made available to client JavaScript (`true` by default).
63 64
 * `signed`: a boolean indicating whether the cookie is to be signed (`false` by default). If this is true, another cookie of the same name with the `.sig` suffix appended will also be sent, with a 27-byte url-safe base64 SHA1 value representing the hash of _cookie-name_=_cookie-value_ against the first [Keygrip](https://github.com/jed/keygrip) key. This signature key is used to detect tampering the next time a cookie is received.
64 65
 
@@ -112,4 +113,4 @@ Copyright
112 113
 
113 114
 Copyright (c) 2012 Jed Schmidt. See LICENSE.txt for details.
114 115
 
115  
-Send any questions or comments [here](http://twitter.com/jedschmidt).
  116
+Send any questions or comments [here](http://twitter.com/jedschmidt).
1  lib/cookies.js
@@ -50,6 +50,7 @@ Cookies.prototype = {
50 50
 
51 51
     cookie.secure = secure
52 52
     if (opts && "secure" in opts) cookie.secure = opts.secure
  53
+    if (opts && "secureProxy" in opts) cookie.secure = opts.secureProxy
53 54
     headers.push(cookie.toHeader())
54 55
 
55 56
     if (opts && signed) {
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.