diff --git a/docs/_api/server.md b/docs/_api/server.md index 93a352cb8..71e8101d2 100644 --- a/docs/_api/server.md +++ b/docs/_api/server.md @@ -71,8 +71,10 @@ routes and handlers for incoming requests. If provided the following restify server options will be ignored: spdy, ca, certificate, key, passphrase, rejectUnauthorized, requestCert and ciphers; however these can all be specified on httpsServerOptions. - - `options.strictRouting` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If set, Restify - will treat "/foo" and "/foo/" as different paths. (optional, default `false`) + - `options.onceNext` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Prevents calling next multiple + times (optional, default `false`) + - `options.strictNext` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Throws error when next() is + called more than once, enabled onceNext option (optional, default `false`) - `options.ignoreTrailingSlash` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** ignore trailing slash on paths (optional, default `false`) diff --git a/lib/index.js b/lib/index.js index 9f9915eb0..3da030b52 100644 --- a/lib/index.js +++ b/lib/index.js @@ -53,8 +53,10 @@ require('./errorTypes'); * If provided the following restify server options will be ignored: * spdy, ca, certificate, key, passphrase, rejectUnauthorized, requestCert and * ciphers; however these can all be specified on httpsServerOptions. - * @param {Boolean} [options.strictRouting=false] - If set, Restify - * will treat "/foo" and "/foo/" as different paths. + * @param {Boolean} [options.onceNext=false] - Prevents calling next multiple + * times + * @param {Boolean} [options.strictNext=false] - Throws error when next() is + * called more than once, enabled onceNext option * @param {Boolean} [options.ignoreTrailingSlash=false] - ignore trailing slash * on paths * @example