Skip to content

Throttling Skip

Thiago Bustamante edited this page Mar 9, 2018 · 2 revisions

A Throttling Skip middleware is a function used to skip some requests from the throttling engine verification. Returning true from the function will skip limiting for that request.

It receives the following parameters:

  • request: The request received by the Gateway from the user.
  • response: The response to be sent by the Gateway to the user.

Each middleware must be defined on its own .js file.

Example:

/**
 * @param request The request received by the Gateway from the user.
 */
module.exports = function (request, response) {
    return false;
};

The above function is the default function used as skip for the throttling.

You can configure a Skip middleware through:

  • Admin Rest API: POST /midleware/throttling/skip
  • SDK: sdk.middleware.addThrottlingSkip(name, fileName);
  • CLI: treeGatewayConfig middleware throttlingSkip -a <name> ./filename.js
Clone this wiki locally