@adobe/helix-html-pipeline 6.8.0 → 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 +14 -0
- package/package.json +1 -1
- package/src/json-pipe.js +4 -1
- package/src/steps/utils.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
## [6.8.1](https://github.com/adobe/helix-html-pipeline/compare/v6.8.0...v6.8.1) (2024-04-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* move config ([#590](https://github.com/adobe/helix-html-pipeline/issues/590)) ([4c6b6e4](https://github.com/adobe/helix-html-pipeline/commit/4c6b6e474639698eef07673c074e3f5e0848df3f))
|
|
14
|
+
|
|
1
15
|
# [6.8.0](https://github.com/adobe/helix-html-pipeline/compare/v6.7.10...v6.8.0) (2024-04-18)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/json-pipe.js
CHANGED
|
@@ -154,8 +154,11 @@ export async function jsonPipe(state, req) {
|
|
|
154
154
|
|
|
155
155
|
if (res.status === 404 && state.info.path === '/config.json' && state.config.public) {
|
|
156
156
|
// special handling for public config
|
|
157
|
+
const publicConfig = {
|
|
158
|
+
public: state.config.public,
|
|
159
|
+
};
|
|
157
160
|
res.status = 200;
|
|
158
|
-
res.body = JSON.stringify(
|
|
161
|
+
res.body = JSON.stringify(publicConfig, null, 2);
|
|
159
162
|
} else if (res.error) {
|
|
160
163
|
if (res.status < 400) {
|
|
161
164
|
return res;
|
package/src/steps/utils.js
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|