@cloud-cli/px 4.1.5 → 4.1.7

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.
@@ -21,6 +21,7 @@ const emptyProxy = {
21
21
  domain: '',
22
22
  target: '',
23
23
  cors: false,
24
+ preserveHost: false,
24
25
  redirect: false,
25
26
  redirectUrl: '',
26
27
  headers: '',
@@ -41,12 +42,12 @@ const readOption = value => {
41
42
  }
42
43
  };
43
44
  function applyProperties(proxy, options) {
44
- const properties = ['target', 'cors', 'redirect', 'redirectUrl', 'headers', 'authorization'];
45
- properties.forEach((p) => {
45
+ const properties = ['target', 'cors', 'redirect', 'redirectUrl', 'headers', 'authorization', 'preserveHost'];
46
+ for (const p of properties) {
46
47
  if (p in options) {
47
48
  proxy[p] = readOption(options[p]);
48
49
  }
49
- });
50
+ }
50
51
  }
51
52
  export class ProxyManager {
52
53
  constructor() {
@@ -128,6 +129,7 @@ export class ProxyManager {
128
129
  cors: t.cors,
129
130
  headers: t.headers,
130
131
  authorization: t.authorization,
132
+ preserveHost: t.preserveHost,
131
133
  }));
132
134
  });
133
135
  px.start();
package/dist/types.d.ts CHANGED
@@ -12,6 +12,7 @@ export interface Proxy {
12
12
  domain: string;
13
13
  target: string;
14
14
  redirect: boolean;
15
+ preserveHost: boolean;
15
16
  redirectUrl: string;
16
17
  headers: string;
17
18
  authorization: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-cli/px",
3
- "version": "4.1.5",
3
+ "version": "4.1.7",
4
4
  "description": "Reverse Proxy",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -8,7 +8,7 @@
8
8
  "prettier": "@cloud-cli/prettier-config",
9
9
  "scripts": {
10
10
  "test": "echo true",
11
- "build": "rm -rf ./dist/* && tsc"
11
+ "build": "rm -rf ./dist/* && npm update && tsc"
12
12
  },
13
13
  "keywords": [
14
14
  "cloudy"