@zengenti/contensis-react-base 3.2.3-beta.4 → 3.2.3-beta.6
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.
|
@@ -688,7 +688,7 @@ const bundleManipulationMiddleware = ({
|
|
|
688
688
|
staticFolderPath,
|
|
689
689
|
staticRoutePath
|
|
690
690
|
}) => (req, res, next) => {
|
|
691
|
-
const filename = path__default.default.basename(req.path);
|
|
691
|
+
const filename = path__default.default.basename(encodeURI(req.path));
|
|
692
692
|
const modernBundle = filename.endsWith('.mjs');
|
|
693
693
|
const legacyBundle = filename.endsWith('.js');
|
|
694
694
|
if ((legacyBundle || modernBundle) && filename.startsWith('runtime.')) {
|
|
@@ -700,7 +700,6 @@ const bundleManipulationMiddleware = ({
|
|
|
700
700
|
res.type('.js').send(modifiedBundle);
|
|
701
701
|
return;
|
|
702
702
|
} catch (readError) {
|
|
703
|
-
// eslint-disable-next-line no-console
|
|
704
703
|
console.log(`Unable to find js runtime bundle at '${jsRuntimeLocation}'`, readError);
|
|
705
704
|
next();
|
|
706
705
|
}
|
|
@@ -3835,9 +3834,7 @@ const webApp = (app, ReactApp, config) => {
|
|
|
3835
3834
|
|
|
3836
3835
|
const versionInfo = getVersionInfo(staticFolderPath);
|
|
3837
3836
|
app.get('/*', cookiesMiddleware__default.default(), async (request, response) => {
|
|
3838
|
-
const
|
|
3839
|
-
url
|
|
3840
|
-
} = request;
|
|
3837
|
+
const url = encodeURI(request.url);
|
|
3841
3838
|
const matchedStaticRoute = () => reactRouterConfig.matchRoutes(routes.StaticRoutes, request.path);
|
|
3842
3839
|
const isStaticRoute = () => matchedStaticRoute().length > 0;
|
|
3843
3840
|
const staticRoute = isStaticRoute() && matchedStaticRoute()[0];
|