{
  "manifest": {
    "name": "http-proxy-middleware",
    "version": "2.0.6",
    "description": "The one-liner node.js proxy middleware for connect, express and browser-sync",
    "main": "dist/index.js",
    "types": "dist/index.d.ts",
    "files": [
      "dist"
    ],
    "scripts": {
      "clean": "rm -rf dist && rm -rf coverage",
      "lint": "yarn prettier && yarn eslint",
      "lint:fix": "yarn prettier:fix && yarn eslint:fix",
      "eslint": "eslint '{src,test}/**/*.ts'",
      "eslint:fix": "yarn eslint --fix",
      "prettier": "prettier --list-different \"**/*.{js,ts,md,yml,json,html}\"",
      "prettier:fix": "prettier --write \"**/*.{js,ts,md,yml,json,html}\"",
      "prebuild": "yarn clean",
      "build": "tsc",
      "pretest": "yarn build",
      "test": "jest",
      "precoverage": "yarn build",
      "coverage": "jest --coverage --coverageReporters=lcov",
      "prepare": "husky install",
      "prepack": "yarn build && rm dist/tsconfig.tsbuildinfo",
      "spellcheck": "npx --yes cspell --show-context --show-suggestions '**/*.*'"
    },
    "repository": {
      "type": "git",
      "url": "https://github.com/chimurai/http-proxy-middleware.git"
    },
    "keywords": [
      "reverse",
      "proxy",
      "middleware",
      "http",
      "https",
      "connect",
      "express",
      "fastify",
      "polka",
      "browser-sync",
      "gulp",
      "grunt-contrib-connect",
      "websocket",
      "ws",
      "cors"
    ],
    "author": {
      "name": "Steven Chim"
    },
    "license": "MIT",
    "bugs": {
      "url": "https://github.com/chimurai/http-proxy-middleware/issues"
    },
    "homepage": "https://github.com/chimurai/http-proxy-middleware#readme",
    "devDependencies": {
      "@commitlint/cli": "16.2.1",
      "@commitlint/config-conventional": "16.2.1",
      "@types/express": "4.17.13",
      "@types/is-glob": "4.0.2",
      "@types/jest": "27.4.0",
      "@types/micromatch": "4.0.2",
      "@types/node": "17.0.18",
      "@types/supertest": "2.0.11",
      "@types/ws": "8.2.2",
      "@typescript-eslint/eslint-plugin": "5.12.0",
      "@typescript-eslint/parser": "5.12.0",
      "body-parser": "1.19.2",
      "browser-sync": "2.27.7",
      "connect": "3.7.0",
      "eslint": "8.9.0",
      "eslint-config-prettier": "8.3.0",
      "eslint-plugin-prettier": "4.0.0",
      "express": "4.17.3",
      "get-port": "5.1.1",
      "husky": "7.0.4",
      "jest": "27.5.1",
      "lint-staged": "12.3.4",
      "mockttp": "2.6.0",
      "open": "8.4.0",
      "prettier": "2.5.1",
      "supertest": "6.2.2",
      "ts-jest": "27.1.3",
      "typescript": "4.5.5",
      "ws": "8.5.0"
    },
    "dependencies": {
      "@types/http-proxy": "^1.17.8",
      "http-proxy": "^1.18.1",
      "is-glob": "^4.0.1",
      "is-plain-obj": "^3.0.0",
      "micromatch": "^4.0.2"
    },
    "peerDependencies": {
      "@types/express": "^4.17.13"
    },
    "peerDependenciesMeta": {
      "@types/express": {
        "optional": true
      }
    },
    "engines": {
      "node": ">=12.0.0"
    },
    "commitlint": {
      "extends": [
        "@commitlint/config-conventional"
      ]
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-http-proxy-middleware-2.0.6-e1a4dd6979572c7ab5a4e4b55095d1f32a74963f-integrity/node_modules/http-proxy-middleware/package.json",
    "readmeFilename": "README.md",
    "readme": "# http-proxy-middleware\n\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/chimurai/http-proxy-middleware/CI/master?style=flat-square)](https://github.com/chimurai/http-proxy-middleware/actions?query=branch%3Amaster)\n[![Coveralls](https://img.shields.io/coveralls/chimurai/http-proxy-middleware.svg?style=flat-square)](https://coveralls.io/r/chimurai/http-proxy-middleware)\n[![dependency Status](https://snyk.io/test/npm/http-proxy-middleware/badge.svg?style=flat-square)](https://snyk.io/test/npm/http-proxy-middleware)\n[![npm](https://img.shields.io/npm/v/http-proxy-middleware?color=%23CC3534&style=flat-square)](https://www.npmjs.com/package/http-proxy-middleware)\n\nNode.js proxying made simple. Configure proxy middleware with ease for [connect](https://github.com/senchalabs/connect), [express](https://github.com/strongloop/express), [browser-sync](https://github.com/BrowserSync/browser-sync) and [many more](#compatible-servers).\n\nPowered by the popular Nodejitsu [`http-proxy`](https://github.com/nodejitsu/node-http-proxy). [![GitHub stars](https://img.shields.io/github/stars/nodejitsu/node-http-proxy.svg?style=social&label=Star)](https://github.com/nodejitsu/node-http-proxy)\n\n## ⚠️ Note <!-- omit in toc -->\n\nThis page is showing documentation for version v2.x.x ([release notes](https://github.com/chimurai/http-proxy-middleware/releases))\n\nIf you're looking for v0.x documentation. Go to:\nhttps://github.com/chimurai/http-proxy-middleware/tree/v0.21.0#readme\n\n## TL;DR <!-- omit in toc -->\n\nProxy `/api` requests to `http://www.example.org`\n\n```javascript\n// javascript\n\nconst express = require('express');\nconst { createProxyMiddleware } = require('http-proxy-middleware');\n\nconst app = express();\n\napp.use('/api', createProxyMiddleware({ target: 'http://www.example.org', changeOrigin: true }));\napp.listen(3000);\n\n// http://localhost:3000/api/foo/bar -> http://www.example.org/api/foo/bar\n```\n\n```typescript\n// typescript\n\nimport * as express from 'express';\nimport { createProxyMiddleware, Filter, Options, RequestHandler } from 'http-proxy-middleware';\n\nconst app = express();\n\napp.use('/api', createProxyMiddleware({ target: 'http://www.example.org', changeOrigin: true }));\napp.listen(3000);\n\n// http://localhost:3000/api/foo/bar -> http://www.example.org/api/foo/bar\n```\n\n_All_ `http-proxy` [options](https://github.com/nodejitsu/node-http-proxy#options) can be used, along with some extra `http-proxy-middleware` [options](#options).\n\n:bulb: **Tip:** Set the option `changeOrigin` to `true` for [name-based virtual hosted sites](http://en.wikipedia.org/wiki/Virtual_hosting#Name-based).\n\n## Table of Contents <!-- omit in toc -->\n\n- [Install](#install)\n- [Core concept](#core-concept)\n- [Example](#example)\n- [Context matching](#context-matching)\n- [Options](#options)\n  - [http-proxy-middleware options](#http-proxy-middleware-options)\n  - [http-proxy events](#http-proxy-events)\n  - [http-proxy options](#http-proxy-options)\n- [Shorthand](#shorthand)\n  - [app.use(path, proxy)](#appusepath-proxy)\n- [WebSocket](#websocket)\n  - [External WebSocket upgrade](#external-websocket-upgrade)\n- [Intercept and manipulate requests](#intercept-and-manipulate-requests)\n- [Intercept and manipulate responses](#intercept-and-manipulate-responses)\n- [Working examples](#working-examples)\n- [Recipes](#recipes)\n- [Compatible servers](#compatible-servers)\n- [Tests](#tests)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Install\n\n```bash\n$ npm install --save-dev http-proxy-middleware\n```\n\n## Core concept\n\nProxy middleware configuration.\n\n#### createProxyMiddleware([context,] config)\n\n```javascript\nconst { createProxyMiddleware } = require('http-proxy-middleware');\n\nconst apiProxy = createProxyMiddleware('/api', { target: 'http://www.example.org' });\n//                                    \\____/   \\_____________________________/\n//                                      |                    |\n//                                    context             options\n\n// 'apiProxy' is now ready to be used as middleware in a server.\n```\n\n- **context**: Determine which requests should be proxied to the target host.\n  (more on [context matching](#context-matching))\n- **options.target**: target host to proxy to. _(protocol + host)_\n\n(full list of [`http-proxy-middleware` configuration options](#options))\n\n#### createProxyMiddleware(uri [, config])\n\n```javascript\n// shorthand syntax for the example above:\nconst apiProxy = createProxyMiddleware('http://www.example.org/api');\n```\n\nMore about the [shorthand configuration](#shorthand).\n\n## Example\n\nAn example with `express` server.\n\n```javascript\n// include dependencies\nconst express = require('express');\nconst { createProxyMiddleware } = require('http-proxy-middleware');\n\n// proxy middleware options\n/** @type {import('http-proxy-middleware/dist/types').Options} */\nconst options = {\n  target: 'http://www.example.org', // target host\n  changeOrigin: true, // needed for virtual hosted sites\n  ws: true, // proxy websockets\n  pathRewrite: {\n    '^/api/old-path': '/api/new-path', // rewrite path\n    '^/api/remove/path': '/path', // remove base path\n  },\n  router: {\n    // when request.headers.host == 'dev.localhost:3000',\n    // override target 'http://www.example.org' to 'http://localhost:8000'\n    'dev.localhost:3000': 'http://localhost:8000',\n  },\n};\n\n// create the proxy (without context)\nconst exampleProxy = createProxyMiddleware(options);\n\n// mount `exampleProxy` in web server\nconst app = express();\napp.use('/api', exampleProxy);\napp.listen(3000);\n```\n\n## Context matching\n\nProviding an alternative way to decide which requests should be proxied; In case you are not able to use the server's [`path` parameter](http://expressjs.com/en/4x/api.html#app.use) to mount the proxy or when you need more flexibility.\n\n[RFC 3986 `path`](https://tools.ietf.org/html/rfc3986#section-3.3) is used for context matching.\n\n```ascii\n         foo://example.com:8042/over/there?name=ferret#nose\n         \\_/   \\______________/\\_________/ \\_________/ \\__/\n          |           |            |            |        |\n       scheme     authority       path        query   fragment\n```\n\n- **path matching**\n\n  - `createProxyMiddleware({...})` - matches any path, all requests will be proxied.\n  - `createProxyMiddleware('/', {...})` - matches any path, all requests will be proxied.\n  - `createProxyMiddleware('/api', {...})` - matches paths starting with `/api`\n\n- **multiple path matching**\n\n  - `createProxyMiddleware(['/api', '/ajax', '/someotherpath'], {...})`\n\n- **wildcard path matching**\n\n  For fine-grained control you can use wildcard matching. Glob pattern matching is done by _micromatch_. Visit [micromatch](https://www.npmjs.com/package/micromatch) or [glob](https://www.npmjs.com/package/glob) for more globbing examples.\n\n  - `createProxyMiddleware('**', {...})` matches any path, all requests will be proxied.\n  - `createProxyMiddleware('**/*.html', {...})` matches any path which ends with `.html`\n  - `createProxyMiddleware('/*.html', {...})` matches paths directly under path-absolute\n  - `createProxyMiddleware('/api/**/*.html', {...})` matches requests ending with `.html` in the path of `/api`\n  - `createProxyMiddleware(['/api/**', '/ajax/**'], {...})` combine multiple patterns\n  - `createProxyMiddleware(['/api/**', '!**/bad.json'], {...})` exclusion\n\n  **Note**: In multiple path matching, you cannot use string paths and wildcard paths together.\n\n- **custom matching**\n\n  For full control you can provide a custom function to determine which requests should be proxied or not.\n\n  ```javascript\n  /**\n   * @return {Boolean}\n   */\n  const filter = function (pathname, req) {\n    return pathname.match('^/api') && req.method === 'GET';\n  };\n\n  const apiProxy = createProxyMiddleware(filter, {\n    target: 'http://www.example.org',\n  });\n  ```\n\n## Options\n\n### http-proxy-middleware options\n\n- **option.pathRewrite**: object/function, rewrite target's url path. Object-keys will be used as _RegExp_ to match paths.\n\n  ```javascript\n  // rewrite path\n  pathRewrite: {'^/old/api' : '/new/api'}\n\n  // remove path\n  pathRewrite: {'^/remove/api' : ''}\n\n  // add base path\n  pathRewrite: {'^/' : '/basepath/'}\n\n  // custom rewriting\n  pathRewrite: function (path, req) { return path.replace('/api', '/base/api') }\n\n  // custom rewriting, returning Promise\n  pathRewrite: async function (path, req) {\n    const should_add_something = await httpRequestToDecideSomething(path);\n    if (should_add_something) path += \"something\";\n    return path;\n  }\n  ```\n\n- **option.router**: object/function, re-target `option.target` for specific requests.\n\n  ```javascript\n  // Use `host` and/or `path` to match requests. First match will be used.\n  // The order of the configuration matters.\n  router: {\n      'integration.localhost:3000' : 'http://localhost:8001',  // host only\n      'staging.localhost:3000'     : 'http://localhost:8002',  // host only\n      'localhost:3000/api'         : 'http://localhost:8003',  // host + path\n      '/rest'                      : 'http://localhost:8004'   // path only\n  }\n\n  // Custom router function (string target)\n  router: function(req) {\n      return 'http://localhost:8004';\n  }\n\n  // Custom router function (target object)\n  router: function(req) {\n      return {\n          protocol: 'https:', // The : is required\n          host: 'localhost',\n          port: 8004\n      };\n  }\n\n  // Asynchronous router function which returns promise\n  router: async function(req) {\n      const url = await doSomeIO();\n      return url;\n  }\n  ```\n\n- **option.logLevel**: string, ['debug', 'info', 'warn', 'error', 'silent']. Default: `'info'`\n\n- **option.logProvider**: function, modify or replace log provider. Default: `console`.\n\n  ```javascript\n  // simple replace\n  function logProvider(provider) {\n    // replace the default console log provider.\n    return require('winston');\n  }\n  ```\n\n  ```javascript\n  // verbose replacement\n  function logProvider(provider) {\n    const logger = new (require('winston').Logger)();\n\n    const myCustomProvider = {\n      log: logger.log,\n      debug: logger.debug,\n      info: logger.info,\n      warn: logger.warn,\n      error: logger.error,\n    };\n    return myCustomProvider;\n  }\n  ```\n\n### http-proxy events\n\nSubscribe to [http-proxy events](https://github.com/nodejitsu/node-http-proxy#listening-for-proxy-events):\n\n- **option.onError**: function, subscribe to http-proxy's `error` event for custom error handling.\n\n  ```javascript\n  function onError(err, req, res, target) {\n    res.writeHead(500, {\n      'Content-Type': 'text/plain',\n    });\n    res.end('Something went wrong. And we are reporting a custom error message.');\n  }\n  ```\n\n- **option.onProxyRes**: function, subscribe to http-proxy's `proxyRes` event.\n\n  ```javascript\n  function onProxyRes(proxyRes, req, res) {\n    proxyRes.headers['x-added'] = 'foobar'; // add new header to response\n    delete proxyRes.headers['x-removed']; // remove header from response\n  }\n  ```\n\n- **option.onProxyReq**: function, subscribe to http-proxy's `proxyReq` event.\n\n  ```javascript\n  function onProxyReq(proxyReq, req, res) {\n    // add custom header to request\n    proxyReq.setHeader('x-added', 'foobar');\n    // or log the req\n  }\n  ```\n\n- **option.onProxyReqWs**: function, subscribe to http-proxy's `proxyReqWs` event.\n\n  ```javascript\n  function onProxyReqWs(proxyReq, req, socket, options, head) {\n    // add custom header\n    proxyReq.setHeader('X-Special-Proxy-Header', 'foobar');\n  }\n  ```\n\n- **option.onOpen**: function, subscribe to http-proxy's `open` event.\n\n  ```javascript\n  function onOpen(proxySocket) {\n    // listen for messages coming FROM the target here\n    proxySocket.on('data', hybridParseAndLogMessage);\n  }\n  ```\n\n- **option.onClose**: function, subscribe to http-proxy's `close` event.\n\n  ```javascript\n  function onClose(res, socket, head) {\n    // view disconnected websocket connections\n    console.log('Client disconnected');\n  }\n  ```\n\n### http-proxy options\n\nThe following options are provided by the underlying [http-proxy](https://github.com/nodejitsu/node-http-proxy#options) library.\n\n- **option.target**: url string to be parsed with the url module\n- **option.forward**: url string to be parsed with the url module\n- **option.agent**: object to be passed to http(s).request (see Node's [https agent](http://nodejs.org/api/https.html#https_class_https_agent) and [http agent](http://nodejs.org/api/http.html#http_class_http_agent) objects)\n- **option.ssl**: object to be passed to https.createServer()\n- **option.ws**: true/false: if you want to proxy websockets\n- **option.xfwd**: true/false, adds x-forward headers\n- **option.secure**: true/false, if you want to verify the SSL Certs\n- **option.toProxy**: true/false, passes the absolute URL as the `path` (useful for proxying to proxies)\n- **option.prependPath**: true/false, Default: true - specify whether you want to prepend the target's path to the proxy path\n- **option.ignorePath**: true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request (note: you will have to append / manually if required).\n- **option.localAddress** : Local interface string to bind for outgoing connections\n- **option.changeOrigin**: true/false, Default: false - changes the origin of the host header to the target URL\n- **option.preserveHeaderKeyCase**: true/false, Default: false - specify whether you want to keep letter case of response header key\n- **option.auth** : Basic authentication i.e. 'user:password' to compute an Authorization header.\n- **option.hostRewrite**: rewrites the location hostname on (301/302/307/308) redirects.\n- **option.autoRewrite**: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.\n- **option.protocolRewrite**: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.\n- **option.cookieDomainRewrite**: rewrites domain of `set-cookie` headers. Possible values:\n  - `false` (default): disable cookie rewriting\n  - String: new domain, for example `cookieDomainRewrite: \"new.domain\"`. To remove the domain, use `cookieDomainRewrite: \"\"`.\n  - Object: mapping of domains to new domains, use `\"*\"` to match all domains.  \n    For example keep one domain unchanged, rewrite one domain and remove other domains:\n    ```json\n    cookieDomainRewrite: {\n      \"unchanged.domain\": \"unchanged.domain\",\n      \"old.domain\": \"new.domain\",\n      \"*\": \"\"\n    }\n    ```\n- **option.cookiePathRewrite**: rewrites path of `set-cookie` headers. Possible values:\n  - `false` (default): disable cookie rewriting\n  - String: new path, for example `cookiePathRewrite: \"/newPath/\"`. To remove the path, use `cookiePathRewrite: \"\"`. To set path to root use `cookiePathRewrite: \"/\"`.\n  - Object: mapping of paths to new paths, use `\"*\"` to match all paths.\n    For example, to keep one path unchanged, rewrite one path and remove other paths:\n    ```json\n    cookiePathRewrite: {\n      \"/unchanged.path/\": \"/unchanged.path/\",\n      \"/old.path/\": \"/new.path/\",\n      \"*\": \"\"\n    }\n    ```\n- **option.headers**: object, adds [request headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields). (Example: `{host:'www.example.org'}`)\n- **option.proxyTimeout**: timeout (in millis) when proxy receives no response from target\n- **option.timeout**: timeout (in millis) for incoming requests\n- **option.followRedirects**: true/false, Default: false - specify whether you want to follow redirects\n- **option.selfHandleResponse** true/false, if set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the `proxyRes` event\n- **option.buffer**: stream of data to send as the request body. Maybe you have some middleware that consumes the request stream before proxying it on e.g. If you read the body of a request into a field called 'req.rawbody' you could restream this field in the buffer option:\n\n  ```javascript\n  'use strict';\n\n  const streamify = require('stream-array');\n  const HttpProxy = require('http-proxy');\n  const proxy = new HttpProxy();\n\n  module.exports = (req, res, next) => {\n    proxy.web(\n      req,\n      res,\n      {\n        target: 'http://localhost:4003/',\n        buffer: streamify(req.rawBody),\n      },\n      next\n    );\n  };\n  ```\n\n## Shorthand\n\nUse the shorthand syntax when verbose configuration is not needed. The `context` and `option.target` will be automatically configured when shorthand is used. Options can still be used if needed.\n\n```javascript\ncreateProxyMiddleware('http://www.example.org:8000/api');\n// createProxyMiddleware('/api', {target: 'http://www.example.org:8000'});\n\ncreateProxyMiddleware('http://www.example.org:8000/api/books/*/**.json');\n// createProxyMiddleware('/api/books/*/**.json', {target: 'http://www.example.org:8000'});\n\ncreateProxyMiddleware('http://www.example.org:8000/api', { changeOrigin: true });\n// createProxyMiddleware('/api', {target: 'http://www.example.org:8000', changeOrigin: true});\n```\n\n### app.use(path, proxy)\n\nIf you want to use the server's `app.use` `path` parameter to match requests;\nCreate and mount the proxy without the http-proxy-middleware `context` parameter:\n\n```javascript\napp.use('/api', createProxyMiddleware({ target: 'http://www.example.org', changeOrigin: true }));\n```\n\n`app.use` documentation:\n\n- express: http://expressjs.com/en/4x/api.html#app.use\n- connect: https://github.com/senchalabs/connect#mount-middleware\n- polka: https://github.com/lukeed/polka#usebase-fn\n\n## WebSocket\n\n```javascript\n// verbose api\ncreateProxyMiddleware('/', { target: 'http://echo.websocket.org', ws: true });\n\n// shorthand\ncreateProxyMiddleware('http://echo.websocket.org', { ws: true });\n\n// shorter shorthand\ncreateProxyMiddleware('ws://echo.websocket.org');\n```\n\n### External WebSocket upgrade\n\nIn the previous WebSocket examples, http-proxy-middleware relies on a initial http request in order to listen to the http `upgrade` event. If you need to proxy WebSockets without the initial http request, you can subscribe to the server's http `upgrade` event manually.\n\n```javascript\nconst wsProxy = createProxyMiddleware('ws://echo.websocket.org', { changeOrigin: true });\n\nconst app = express();\napp.use(wsProxy);\n\nconst server = app.listen(3000);\nserver.on('upgrade', wsProxy.upgrade); // <-- subscribe to http 'upgrade'\n```\n\n## Intercept and manipulate requests\n\nIntercept requests from downstream by defining `onProxyReq` in `createProxyMiddleware`.\n\nCurrently the only pre-provided request interceptor is `fixRequestBody`, which is used to fix proxied POST requests when `bodyParser` is applied before this middleware.\n\nExample:\n\n```javascript\nconst { createProxyMiddleware, fixRequestBody } = require('http-proxy-middleware');\n\nconst proxy = createProxyMiddleware({\n  /**\n   * Fix bodyParser\n   **/\n  onProxyReq: fixRequestBody,\n});\n```\n\n## Intercept and manipulate responses\n\nIntercept responses from upstream with `responseInterceptor`. (Make sure to set `selfHandleResponse: true`)\n\nResponses which are compressed with `brotli`, `gzip` and `deflate` will be decompressed automatically. The response will be returned as `buffer` ([docs](https://nodejs.org/api/buffer.html)) which you can manipulate.\n\nWith `buffer`, response manipulation is not limited to text responses (html/css/js, etc...); image manipulation will be possible too. ([example](https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md#manipulate-image-response))\n\nNOTE: `responseInterceptor` disables streaming of target's response.\n\nExample:\n\n```javascript\nconst { createProxyMiddleware, responseInterceptor } = require('http-proxy-middleware');\n\nconst proxy = createProxyMiddleware({\n  /**\n   * IMPORTANT: avoid res.end being called automatically\n   **/\n  selfHandleResponse: true, // res.end() will be called internally by responseInterceptor()\n\n  /**\n   * Intercept response and replace 'Hello' with 'Goodbye'\n   **/\n  onProxyRes: responseInterceptor(async (responseBuffer, proxyRes, req, res) => {\n    const response = responseBuffer.toString('utf8'); // convert buffer to string\n    return response.replace('Hello', 'Goodbye'); // manipulate response and return the result\n  }),\n});\n```\n\nCheck out [interception recipes](https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md#readme) for more examples.\n\n## Working examples\n\nView and play around with [working examples](https://github.com/chimurai/http-proxy-middleware/tree/master/examples).\n\n- Browser-Sync ([example source](https://github.com/chimurai/http-proxy-middleware/tree/master/examples/browser-sync/index.js))\n- express ([example source](https://github.com/chimurai/http-proxy-middleware/tree/master/examples/express/index.js))\n- connect ([example source](https://github.com/chimurai/http-proxy-middleware/tree/master/examples/connect/index.js))\n- WebSocket ([example source](https://github.com/chimurai/http-proxy-middleware/tree/master/examples/websocket/index.js))\n- Response Manipulation ([example source](https://github.com/chimurai/http-proxy-middleware/blob/master/examples/response-interceptor/index.js))\n\n## Recipes\n\nView the [recipes](https://github.com/chimurai/http-proxy-middleware/tree/master/recipes) for common use cases.\n\n## Compatible servers\n\n`http-proxy-middleware` is compatible with the following servers:\n\n- [connect](https://www.npmjs.com/package/connect)\n- [express](https://www.npmjs.com/package/express)\n- [fastify](https://www.npmjs.com/package/fastify)\n- [browser-sync](https://www.npmjs.com/package/browser-sync)\n- [lite-server](https://www.npmjs.com/package/lite-server)\n- [polka](https://github.com/lukeed/polka)\n- [grunt-contrib-connect](https://www.npmjs.com/package/grunt-contrib-connect)\n- [grunt-browser-sync](https://www.npmjs.com/package/grunt-browser-sync)\n- [gulp-connect](https://www.npmjs.com/package/gulp-connect)\n- [gulp-webserver](https://www.npmjs.com/package/gulp-webserver)\n\nSample implementations can be found in the [server recipes](https://github.com/chimurai/http-proxy-middleware/tree/master/recipes/servers.md).\n\n## Tests\n\nRun the test suite:\n\n```bash\n# install dependencies\n$ yarn\n\n# linting\n$ yarn lint\n$ yarn lint:fix\n\n# building (compile typescript to js)\n$ yarn build\n\n# unit tests\n$ yarn test\n\n# code coverage\n$ yarn cover\n\n# check spelling mistakes\n$ yarn spellcheck\n```\n\n## Changelog\n\n- [View changelog](https://github.com/chimurai/http-proxy-middleware/blob/master/CHANGELOG.md)\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2015-2022 Steven Chim\n",
    "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2015 Steven Chim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
    "hash": "e1a4dd6979572c7ab5a4e4b55095d1f32a74963f",
    "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
    "registry": "npm",
    "packageName": "http-proxy-middleware",
    "cacheIntegrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== sha1-4aTdaXlXLHq1pOS1UJXR8yp0lj8="
  },
  "registry": "npm",
  "hash": "e1a4dd6979572c7ab5a4e4b55095d1f32a74963f"
}