@adobe/helix-html-pipeline 6.27.24 → 6.27.26

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,17 @@
1
+ ## [6.27.26](https://github.com/adobe/helix-html-pipeline/compare/v6.27.25...v6.27.26) (2026-03-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/mdast-util-gridtables to v4.0.18 ([#1052](https://github.com/adobe/helix-html-pipeline/issues/1052)) ([9c79963](https://github.com/adobe/helix-html-pipeline/commit/9c7996303af9640ccf7f07eb6e37192536f635fc))
7
+
8
+ ## [6.27.25](https://github.com/adobe/helix-html-pipeline/compare/v6.27.24...v6.27.25) (2026-03-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * better logging for xfh ([b09cf5d](https://github.com/adobe/helix-html-pipeline/commit/b09cf5de887f56aadebf6db37812910a9d45f7e2))
14
+
1
15
  ## [6.27.24](https://github.com/adobe/helix-html-pipeline/compare/v6.27.23...v6.27.24) (2026-03-10)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.27.24",
3
+ "version": "6.27.26",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@adobe/helix-markdown-support": "7.1.18",
46
46
  "@adobe/helix-shared-utils": "3.0.2",
47
- "@adobe/mdast-util-gridtables": "4.0.17",
47
+ "@adobe/mdast-util-gridtables": "4.0.18",
48
48
  "@adobe/remark-gridtables": "3.0.18",
49
49
  "github-slugger": "2.0.0",
50
50
  "hast-util-raw": "9.1.0",
@@ -70,13 +70,13 @@
70
70
  "unist-util-visit-parents": "6.0.2"
71
71
  },
72
72
  "devDependencies": {
73
- "@adobe/eslint-config-helix": "3.0.21",
73
+ "@adobe/eslint-config-helix": "3.0.22",
74
74
  "@eslint/config-helpers": "0.5.2",
75
75
  "@markedjs/html-differ": "5.0.4",
76
76
  "@semantic-release/changelog": "6.0.3",
77
77
  "@semantic-release/git": "10.0.1",
78
- "@semantic-release/npm": "13.1.4",
79
- "c8": "10.1.3",
78
+ "@semantic-release/npm": "13.1.5",
79
+ "c8": "11.0.0",
80
80
  "eslint": "9.4.0",
81
81
  "eslint-import-resolver-exports": "1.0.0-beta.5",
82
82
  "eslint-plugin-header": "3.1.1",
@@ -86,7 +86,7 @@
86
86
  "js-yaml": "4.1.1",
87
87
  "jsdom": "28.1.0",
88
88
  "junit-report-builder": "5.1.1",
89
- "lint-staged": "16.2.7",
89
+ "lint-staged": "16.3.2",
90
90
  "mocha": "11.7.5",
91
91
  "mocha-multi-reporters": "1.5.1",
92
92
  "mocha-suppress-logs": "0.6.0",
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
  import { Modifiers } from '../utils/modifiers.js';
13
- import { getOriginalHost } from './utils.js';
13
+ import { getOriginalHost, getXFH } from './utils.js';
14
14
  import { recordLastModified } from '../utils/last-modified.js';
15
15
 
16
16
  function replaceParams(str, info) {
@@ -44,8 +44,9 @@ export default function initConfig(state, req, res) {
44
44
  state.previewHost = replaceParams(config.cdn?.preview?.host, state);
45
45
  state.liveHost = replaceParams(config.cdn?.live?.host, state);
46
46
  const configuredProdHost = config.cdn?.prod?.host;
47
- if (!configuredProdHost && req.headers.get('x-forwarded-host')) {
48
- state.log.warn(`[${state.org}/${state.site}] cdn.prod.host is not configured, falling back to x-forwarded-host. This will be removed in a future version.`);
47
+ const xfh = getXFH(req.headers);
48
+ if (!configuredProdHost && xfh && !xfh.endsWith('.aem.page') && !xfh.endsWith('.aem.live')) {
49
+ state.log.warn(`[${state.org}/${state.site}] cdn.prod.host is not configured, falling back to x-forwarded-host: ${xfh}`);
49
50
  }
50
51
  state.prodHost = configuredProdHost || getOriginalHost(req.headers);
51
52
  recordLastModified(state, res, 'config', state.config.lastModified);
@@ -17,11 +17,11 @@ const MEDIA_BLOB_REGEXP = /^https:\/\/.*\.(aem|hlx3?)\.(live|page)\/media_.*/;
17
17
  const HELIX_URL_REGEXP = /^https:\/\/.*\.(aem|hlx3?)\.(live|page)\/?.*/;
18
18
 
19
19
  /**
20
- * Returns the original host name from the request to the outer CDN.
20
+ * Returns the x-forwarded-host from the header
21
21
  * @param {object} headers The request headers
22
22
  * @returns {string} The original host
23
23
  */
24
- export function getOriginalHost(headers) {
24
+ export function getXFH(headers) {
25
25
  const xfh = headers.get('x-forwarded-host');
26
26
  if (xfh) {
27
27
  const segs = xfh.split(',');
@@ -32,7 +32,16 @@ export function getOriginalHost(headers) {
32
32
  }
33
33
  }
34
34
  }
35
- return headers.get('host');
35
+ return '';
36
+ }
37
+
38
+ /**
39
+ * Returns the original host name from the request to the outer CDN.
40
+ * @param {object} headers The request headers
41
+ * @returns {string} The original host
42
+ */
43
+ export function getOriginalHost(headers) {
44
+ return getXFH(headers) || headers.get('host');
36
45
  }
37
46
 
38
47
  /**