@eeacms/volto-eea-website-policy 1.3.1 → 1.3.2

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
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [1.3.2](https://github.com/eea/volto-eea-website-policy/compare/1.3.1...1.3.2) - 16 February 2023
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix(/en): threat non-en paths as external - refs #158717 [Alin Voinea - [`f2da4b1`](https://github.com/eea/volto-eea-website-policy/commit/f2da4b11fd0b2bfc7d148ffd7444cd92da9eea0c)]
12
+
7
13
  ### [1.3.1](https://github.com/eea/volto-eea-website-policy/compare/1.3.0...1.3.1) - 9 February 2023
8
14
 
9
15
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
package/src/index.js CHANGED
@@ -4,11 +4,19 @@ import installLayoutSettingsBlock from '@eeacms/volto-eea-website-policy/compone
4
4
  import { addStylingFieldsetSchemaEnhancer } from '@eeacms/volto-eea-website-policy/components/Blocks/schema';
5
5
 
6
6
  const applyConfig = (config) => {
7
- // IMS
8
- config.settings.externalRoutes = [
9
- ...(config.settings.externalRoutes || []),
10
- { match: '/ims' },
11
- ];
7
+ // #158717#note-25 any path that isn't static, en or controlpanel is treated as external
8
+ if (!config.settings.publicURL.includes('localhost')) {
9
+ const notInEN = /^(?!.*(\/en|\/static|\/controlpanel|\/cypress)).*$/;
10
+ config.settings.externalRoutes = [
11
+ {
12
+ match: {
13
+ path: notInEN,
14
+ exact: false,
15
+ strict: false,
16
+ },
17
+ },
18
+ ];
19
+ }
12
20
 
13
21
  // #137187 Keycloak integration
14
22
  if (runtimeConfig['RAZZLE_KEYCLOAK'] === 'Yes') {