@adobe/helix-html-pipeline 6.8.1 → 6.9.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,10 @@
1
+ # [6.9.0](https://github.com/adobe/helix-html-pipeline/compare/v6.8.1...v6.9.0) (2024-04-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * improve xfh parsing ([#594](https://github.com/adobe/helix-html-pipeline/issues/594)) ([d90a285](https://github.com/adobe/helix-html-pipeline/commit/d90a285a575fa36527e0045271b5f856ce66a932)), closes [#592](https://github.com/adobe/helix-html-pipeline/issues/592)
7
+
1
8
  ## [6.8.1](https://github.com/adobe/helix-html-pipeline/compare/v6.8.0...v6.8.1) (2024-04-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.8.1",
3
+ "version": "6.9.0",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -24,7 +24,13 @@ const HELIX_URL_REGEXP = /^https:\/\/(?!admin\.|www\.)[^.]+\.(aem|hlx3?)\.(live|
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
  }