@adobe/helix-html-pipeline 5.9.9 → 5.10.0

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,3 +1,22 @@
1
+ # [5.10.0](https://github.com/adobe/helix-html-pipeline/compare/v5.9.10...v5.10.0) (2024-04-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/helix-shared-utils to v3.0.2 ([0ce7198](https://github.com/adobe/helix-html-pipeline/commit/0ce719831535424057f46cf58907629c85d0e463))
7
+
8
+
9
+ ### Features
10
+
11
+ * improve xfh parsing ([438d35f](https://github.com/adobe/helix-html-pipeline/commit/438d35f3b1303531332043cb569e1f4e6175ea20)), closes [#592](https://github.com/adobe/helix-html-pipeline/issues/592)
12
+
13
+ ## [5.9.10](https://github.com/adobe/helix-html-pipeline/compare/v5.9.9...v5.9.10) (2024-04-13)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **deps:** update dependency jose to v5.2.4 ([f8fde9c](https://github.com/adobe/helix-html-pipeline/commit/f8fde9c05c534be74f8dd717b5c80d0ce1e30ea1))
19
+
1
20
  ## [5.9.9](https://github.com/adobe/helix-html-pipeline/compare/v5.9.8...v5.9.9) (2024-04-06)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "5.9.9",
3
+ "version": "5.10.0",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -16,6 +16,7 @@
16
16
  "test": "c8 mocha",
17
17
  "lint": "eslint .",
18
18
  "semantic-release": "semantic-release",
19
+ "semantic-release-dry": "semantic-release --dry-run --branches main,$CI_BRANCH",
19
20
  "prepare": "husky install"
20
21
  },
21
22
  "repository": {
@@ -43,7 +44,7 @@
43
44
  },
44
45
  "dependencies": {
45
46
  "@adobe/helix-markdown-support": "7.1.2",
46
- "@adobe/helix-shared-utils": "3.0.1",
47
+ "@adobe/helix-shared-utils": "3.0.2",
47
48
  "@adobe/mdast-util-gridtables": "4.0.4",
48
49
  "@adobe/remark-gridtables": "3.0.4",
49
50
  "cookie": "0.6.0",
@@ -53,7 +54,7 @@
53
54
  "hast-util-to-html": "9.0.1",
54
55
  "hast-util-to-string": "3.0.0",
55
56
  "hastscript": "9.0.0",
56
- "jose": "5.2.3",
57
+ "jose": "5.2.4",
57
58
  "lodash.escape": "4.0.1",
58
59
  "mdast-util-to-hast": "13.1.0",
59
60
  "mdast-util-to-string": "4.0.0",
@@ -90,7 +91,7 @@
90
91
  "mocha": "10.4.0",
91
92
  "mocha-multi-reporters": "1.5.1",
92
93
  "mocha-suppress-logs": "0.5.1",
93
- "semantic-release": "22.0.12"
94
+ "semantic-release": "23.0.8"
94
95
  },
95
96
  "lint-staged": {
96
97
  "*.js": "eslint",
@@ -24,7 +24,13 @@ const HELIX_URL_REGEXP = /^https:\/\/(?!admin\.|www\.)[^.]+\.hlx3?\.(live|page)\
24
24
  export function getOriginalHost(headers) {
25
25
  const xfh = headers.get('x-forwarded-host');
26
26
  if (xfh) {
27
- return xfh.split(',')[0].trim();
27
+ const segs = xfh.split(',');
28
+ for (const seg of segs) {
29
+ const host = seg.trim();
30
+ if (host) {
31
+ return host;
32
+ }
33
+ }
28
34
  }
29
35
  return headers.get('host');
30
36
  }