@zengenti/contensis-react-base 3.0.2-beta.21 → 3.0.2-beta.22
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.
|
@@ -4192,12 +4192,16 @@ const webApp = (app, ReactApp, config) => {
|
|
|
4192
4192
|
|
|
4193
4193
|
// dispatch any global and non-saga related actions before calling our JSX
|
|
4194
4194
|
const versionStatus = ContensisDeliveryApi.deliveryApi.getServerSideVersionStatus(request);
|
|
4195
|
-
|
|
4195
|
+
|
|
4196
|
+
// In server-side blocks world, the hostname requested by the client resides in the x-orig-host header
|
|
4197
|
+
// Because of this, we prioritize x-orig-host when setting our hostname
|
|
4198
|
+
const hostname = request.headers['x-orig-host'] || request.hostname;
|
|
4199
|
+
console.info(`Request for ${request.path} hostname: ${hostname} versionStatus: ${versionStatus}`);
|
|
4196
4200
|
store.dispatch(version$1.setVersionStatus(versionStatus));
|
|
4197
4201
|
store.dispatch(version$1.setVersion(versionInfo.commitRef, versionInfo.buildNo));
|
|
4198
|
-
const project = App.pickProject(
|
|
4202
|
+
const project = App.pickProject(hostname, request.query);
|
|
4199
4203
|
const groups = allowedGroups && allowedGroups[project];
|
|
4200
|
-
store.dispatch(selectors.setCurrentProject(project, groups,
|
|
4204
|
+
store.dispatch(selectors.setCurrentProject(project, groups, hostname));
|
|
4201
4205
|
const loadableExtractor = loadableChunkExtractors();
|
|
4202
4206
|
const jsx = /*#__PURE__*/React__default["default"].createElement(server$1.ChunkExtractorManager, {
|
|
4203
4207
|
extractor: loadableExtractor.commonLoadableExtractor
|