Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added secureProxy option

  • Loading branch information...
commit 1a902169bfe5641721337459bc57cd9779c8f4ca 1 parent b167c7c
@michaelwittig michaelwittig authored
Showing with 3 additions and 1 deletion.
  1. +2 −1  README.md
  2. +1 −0  lib/cookies.js
View
3  README.md
@@ -59,6 +59,7 @@ If the _options_ object is provided, it will be used to generate the outbound co
* `path`: a string indicating the path of the cookie (`/` by default).
* `domain`: a string indicating the domain of the cookie (no default).
* `secure`: a boolean indicating whether the cookie is only to be sent over HTTPS (`false` by default for HTTP, `true` by default for HTTPS).
+* `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).
* `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).
* `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.
@@ -112,4 +113,4 @@ Copyright
Copyright (c) 2012 Jed Schmidt. See LICENSE.txt for details.
-Send any questions or comments [here](http://twitter.com/jedschmidt).
+Send any questions or comments [here](http://twitter.com/jedschmidt).
View
1  lib/cookies.js
@@ -50,6 +50,7 @@ Cookies.prototype = {
cookie.secure = secure
if (opts && "secure" in opts) cookie.secure = opts.secure
+ if (opts && "secureProxy" in opts) cookie.secure = opts.secureProxy
headers.push(cookie.toHeader())
if (opts && signed) {
Please sign in to comment.
Something went wrong with that request. Please try again.