How to use the http-proxy.stack function in http-proxy

To help you get started, we’ve selected a few http-proxy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NREL / api-umbrella / lib / gatekeeper / worker.js View on Github external
connect.query(),
      middleware.forwardedIp(),
      middleware.basicAuth(),
      middleware.apiMatcher(),
      middleware.apiSettings(),
      middleware.apiKeyValidator(this),
      middleware.roleValdiator(this),
      middleware.ipValidator(this),
      middleware.refererValidator(this),
      middleware.rateLimit(this),
      middleware.rewriteRequest(),
      middleware.proxyBufferedRequest(this.server.proxy),
      middleware.rewriteResponse(),
    ];

    this.stack = httpProxy.stack(this.middlewares, this.server.proxy);

    this.server.listen(port, config.get('gatekeeper.host'));
  },