@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.
|
@@ -4176,12 +4176,16 @@ const webApp = (app, ReactApp, config) => {
|
|
|
4176
4176
|
|
|
4177
4177
|
// dispatch any global and non-saga related actions before calling our JSX
|
|
4178
4178
|
const versionStatus = deliveryApi.getServerSideVersionStatus(request);
|
|
4179
|
-
|
|
4179
|
+
|
|
4180
|
+
// In server-side blocks world, the hostname requested by the client resides in the x-orig-host header
|
|
4181
|
+
// Because of this, we prioritize x-orig-host when setting our hostname
|
|
4182
|
+
const hostname = request.headers['x-orig-host'] || request.hostname;
|
|
4183
|
+
console.info(`Request for ${request.path} hostname: ${hostname} versionStatus: ${versionStatus}`);
|
|
4180
4184
|
store.dispatch(setVersionStatus(versionStatus));
|
|
4181
4185
|
store.dispatch(setVersion(versionInfo.commitRef, versionInfo.buildNo));
|
|
4182
|
-
const project = pickProject(
|
|
4186
|
+
const project = pickProject(hostname, request.query);
|
|
4183
4187
|
const groups = allowedGroups && allowedGroups[project];
|
|
4184
|
-
store.dispatch(setCurrentProject(project, groups,
|
|
4188
|
+
store.dispatch(setCurrentProject(project, groups, hostname));
|
|
4185
4189
|
const loadableExtractor = loadableChunkExtractors();
|
|
4186
4190
|
const jsx = /*#__PURE__*/React.createElement(ChunkExtractorManager, {
|
|
4187
4191
|
extractor: loadableExtractor.commonLoadableExtractor
|