@adobe/helix-html-pipeline 5.2.0 → 5.3.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
+ # [5.3.0](https://github.com/adobe/helix-html-pipeline/compare/v5.2.0...v5.3.0) (2023-12-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * add xfh debug ([#468](https://github.com/adobe/helix-html-pipeline/issues/468)) ([940a57b](https://github.com/adobe/helix-html-pipeline/commit/940a57bee7a0b7c394c08da59c3a66b7a1d5868d))
7
+
1
8
  # [5.2.0](https://github.com/adobe/helix-html-pipeline/compare/v5.1.3...v5.2.0) (2023-11-15)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -53,10 +53,10 @@
53
53
  "hast-util-to-html": "9.0.0",
54
54
  "hast-util-to-string": "3.0.0",
55
55
  "hastscript": "8.0.0",
56
- "jose": "5.1.0",
56
+ "jose": "5.1.3",
57
57
  "mdast-util-to-hast": "13.0.2",
58
58
  "mdast-util-to-string": "4.0.0",
59
- "mime": "3.0.0",
59
+ "mime": "4.0.0",
60
60
  "rehype-format": "5.0.0",
61
61
  "rehype-parse": "9.0.0",
62
62
  "remark-parse": "11.0.0",
@@ -70,26 +70,26 @@
70
70
  "unist-util-visit-parents": "6.0.1"
71
71
  },
72
72
  "devDependencies": {
73
- "@adobe/eslint-config-helix": "2.0.4",
73
+ "@adobe/eslint-config-helix": "2.0.5",
74
74
  "@markedjs/html-differ": "4.0.2",
75
75
  "@semantic-release/changelog": "6.0.3",
76
76
  "@semantic-release/git": "10.0.1",
77
77
  "@semantic-release/npm": "11.0.1",
78
78
  "c8": "8.0.1",
79
- "eslint": "8.53.0",
79
+ "eslint": "8.55.0",
80
80
  "eslint-import-resolver-exports": "1.0.0-beta.5",
81
81
  "eslint-plugin-header": "3.1.1",
82
82
  "eslint-plugin-import": "2.29.0",
83
83
  "esmock": "2.6.0",
84
84
  "husky": "8.0.3",
85
85
  "js-yaml": "4.1.0",
86
- "jsdom": "22.1.0",
86
+ "jsdom": "23.0.1",
87
87
  "junit-report-builder": "3.1.0",
88
88
  "lint-staged": "15.1.0",
89
89
  "mocha": "10.2.0",
90
90
  "mocha-multi-reporters": "1.5.1",
91
91
  "mocha-suppress-logs": "0.4.1",
92
- "semantic-release": "22.0.7"
92
+ "semantic-release": "22.0.8"
93
93
  },
94
94
  "lint-staged": {
95
95
  "*.js": "eslint",
package/src/utils/auth.js CHANGED
@@ -109,7 +109,8 @@ export async function decodeIdToken(state, idToken, lenient = false) {
109
109
  function getRequestHostAndProto(state, req) {
110
110
  // determine the location of 'this' document based on the xfh header. so that logins to
111
111
  // .page stay on .page. etc. but fallback to the config.host if non set
112
- let host = req.headers.get('x-forwarded-host');
112
+ const xfh = req.headers.get('x-forwarded-host');
113
+ let host = xfh;
113
114
  if (host) {
114
115
  host = host.split(',')[0].trim();
115
116
  }
@@ -118,7 +119,7 @@ function getRequestHostAndProto(state, req) {
118
119
  }
119
120
  // fastly overrides the x-forwarded-proto, so we use x-forwarded-scheme
120
121
  const proto = req.headers.get('x-forwarded-scheme') || req.headers.get('x-forwarded-proto') || 'https';
121
- state.log.info(`request host is: ${host} (${proto})`);
122
+ state.log.info(`request host is: ${host} (${proto}) (xfh=${xfh})`);
122
123
  return {
123
124
  host,
124
125
  proto,