@eeacms/volto-arcgis-block 0.1.446 → 0.1.447

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,8 @@ 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
+ ### [0.1.447](https://github.com/eea/volto-arcgis-block/compare/0.1.446...0.1.447) - 8 May 2026
8
+
7
9
  ### [0.1.446](https://github.com/eea/volto-arcgis-block/compare/0.1.445...0.1.446) - 7 May 2026
8
10
 
9
11
  ### [0.1.445](https://github.com/eea/volto-arcgis-block/compare/0.1.444...0.1.445) - 28 April 2026
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.446",
3
+ "version": "0.1.447",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -2307,16 +2307,21 @@ class MenuWidget extends React.Component {
2307
2307
  }
2308
2308
 
2309
2309
  getProxyBase = () => {
2310
- const href = window.location.href || '';
2311
- return href.replace('/en/map-viewer', '/ogcproxy/');
2310
+ // const origin = window?.location?.origin || '';
2311
+ // return origin ? `${origin}/ogcproxy/` : '/ogcproxy/';
2312
2312
  // return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
2313
- // return 'https://land.copernicus.eu/ogcproxy/';
2313
+ return 'https://land.copernicus.eu/ogcproxy/';
2314
2314
  };
2315
2315
 
2316
2316
  buildProxiedUrl(url) {
2317
2317
  if (!url) return url;
2318
2318
  const hasProxy = /\/ogcproxy\//i.test(url);
2319
- return hasProxy ? url : this.getProxyBase() + this.stripProtocol(url);
2319
+ if (hasProxy) {
2320
+ const strippedUrl = this.stripProtocol(url);
2321
+ const proxyPath = strippedUrl.split(/\/ogcproxy\//i)[1] || '';
2322
+ return this.getProxyBase() + proxyPath.replace(/^\/+/, '');
2323
+ }
2324
+ return this.getProxyBase() + this.stripProtocol(url);
2320
2325
  }
2321
2326
 
2322
2327
  parseWMSLayers(xml) {
@@ -310,13 +310,20 @@ class UploadWidget extends React.Component {
310
310
  };
311
311
 
312
312
  getProxyBase = () => {
313
- const href = window.location.href || '';
314
- return href.replace('/en/map-viewer', '/ogcproxy/');
313
+ // const origin = window?.location?.origin || '';
314
+ // return origin ? `${origin}/ogcproxy/` : '/ogcproxy/';
315
315
  // return 'https://clmsdemo.devel6cph.eea.europa.eu/ogcproxy/';
316
- // return 'https://land.copernicus.eu/ogcproxy/';
316
+ return 'https://land.copernicus.eu/ogcproxy/';
317
317
  };
318
318
 
319
319
  buildProxiedUrl = (url) => {
320
+ if (!url) return url;
321
+ const hasProxy = /\/ogcproxy\//i.test(url);
322
+ if (hasProxy) {
323
+ const strippedUrl = this.stripProtocol(url);
324
+ const proxyPath = strippedUrl.split(/\/ogcproxy\//i)[1] || '';
325
+ return this.getProxyBase() + proxyPath.replace(/^\/+/, '');
326
+ }
320
327
  return this.getProxyBase() + this.stripProtocol(url);
321
328
  };
322
329