1
0
Fork 0

Lowercase HTTP headers for maximum profit.

This commit is contained in:
Alan Plum 2014-09-04 16:04:19 +02:00
parent 166bdc9a46
commit e48fb8bfe8
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ If *type* is set to *"cookie"*, the session cookie will be updated after every r
* *type* (optional): sessions type, currently only *"cookie"* and *"header"* are supported. Default: *"cookie"*.
* *cookieName* (optional): name of the session cookie if using cookie sessions. If a *cookieSecret* is provided, the signature will be stored in a cookie named *cookieName + "_sig"*. Default: *"sid"*.
* *cookieSecret* (optional): secret string to sign session cookies with if using cookie sessions.
* *headerName* (optional): name of the session header if using header sessions. Default: *"X-Session-Id"*.
* *headerName* (optional): name of the session header if using header sessions. Default: *"x-session-id"*.
* *autoCreateSession* (optional): whether a session should always be created if none exists. Default: *true*.
@EXAMPLES

View File

@ -159,7 +159,7 @@ function Sessions(opts) {
throw new Error('Header name must be a string or empty.');
}
if (!opts.headerName) {
opts.headerName = 'X-Session-Id';
opts.headerName = 'x-session-id';
}
} else {
throw new Error('Only "cookie" and "header" type sessions are supported at this time.');