http-proxy-middleware 1.1.1-alpha.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## next
3
+ ## [v1.1.1](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.1.1)
4
4
 
5
+ - fix(error handler): re-throw http-proxy missing target error ([#517](https://github.com/chimurai/http-proxy-middleware/pull/517))
6
+ - refactor(dependency): remove `camelcase`
5
7
  - fix(option): optional `target` when `router` is used ([#512](https://github.com/chimurai/http-proxy-middleware/pull/512))
6
8
 
7
9
  ## [v1.1.0](https://github.com/chimurai/http-proxy-middleware/releases/tag/v1.1.0)
package/dist/handlers.js CHANGED
@@ -43,6 +43,10 @@ function getHandlers(options) {
43
43
  }
44
44
  exports.getHandlers = getHandlers;
45
45
  function defaultErrorHandler(err, req, res) {
46
+ // Re-throw error. Not recoverable since req & res are empty.
47
+ if (!req && !res) {
48
+ throw err; // "Error: Must provide a proper URL as target"
49
+ }
46
50
  const host = req.headers && req.headers.host;
47
51
  const code = err.code;
48
52
  if (res.writeHead && !res.headersSent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-proxy-middleware",
3
- "version": "1.1.1-alpha.1",
3
+ "version": "1.1.1",
4
4
  "description": "The one-liner node.js proxy middleware for connect, express and browser-sync",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,6 +33,7 @@
33
33
  "https",
34
34
  "connect",
35
35
  "express",
36
+ "fastify",
36
37
  "polka",
37
38
  "browser-sync",
38
39
  "gulp",
@@ -78,7 +79,6 @@
78
79
  },
79
80
  "dependencies": {
80
81
  "@types/http-proxy": "^1.17.5",
81
- "camelcase": "^6.2.0",
82
82
  "http-proxy": "^1.18.1",
83
83
  "is-glob": "^4.0.1",
84
84
  "is-plain-obj": "^3.0.0",