@adobe/helix-html-pipeline 6.12.6 → 6.12.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [6.12.7](https://github.com/adobe/helix-html-pipeline/compare/v6.12.6...v6.12.7) (2024-06-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * contentbus-id as surrogate key for 404 response ([e0ac46c](https://github.com/adobe/helix-html-pipeline/commit/e0ac46c0a0ac095bdfa69bf3bd151aaee2ee8224))
7
+
1
8
  ## [6.12.6](https://github.com/adobe/helix-html-pipeline/compare/v6.12.5...v6.12.6) (2024-06-19)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.12.6",
3
+ "version": "6.12.7",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -21,7 +21,9 @@ import { getPathKey } from './set-x-surrogate-key-header.js';
21
21
  * @returns {Promise<void>}
22
22
  */
23
23
  export default async function fetch404(state, req, res) {
24
- const { owner, repo, ref } = state;
24
+ const {
25
+ owner, repo, ref, contentBusId,
26
+ } = state;
25
27
  const ret = await state.s3Loader.getObject('helix-code-bus', `${owner}/${repo}/${ref}/404.html`);
26
28
  if (ret.status === 200) {
27
29
  // override last-modified if source-last-modified is set
@@ -38,5 +40,5 @@ export default async function fetch404(state, req, res) {
38
40
 
39
41
  // set 404 keys in any case
40
42
  const pathKey = await getPathKey(state);
41
- res.headers.set('x-surrogate-key', `${pathKey} ${ref}--${repo}--${owner}_404 ${ref}--${repo}--${owner}_code`);
43
+ res.headers.set('x-surrogate-key', `${pathKey} ${contentBusId} ${ref}--${repo}--${owner}_404 ${ref}--${repo}--${owner}_code`);
42
44
  }