mf-geoadmin3 icon indicating copy to clipboard operation
mf-geoadmin3 copied to clipboard

disable service-proxy for WMTS with CORS in 3D - as already done for 2D

Open Rdataflow opened this issue 6 years ago • 4 comments

Situation When using 3rd party WMTS with CORS enabled 2D Tiles are requested directly, while 3D GetTile requests are proxyfied - without any need.

Steps to reproduce

  1. insert GetCapabilities-URL in import & connect (i.e. https://dev.florianamoser.ch/service?REQUEST=GetCapabilities&SERVICE=WMTS) and load a layer
  2. view in 2D works as expected, tiles are fetched directly
  3. change to 3D view, this will proxify tile requests

Proposition As proposed to @gjn this should be configured to disable service-proxy if there is no need for it. https://github.com/geoadmin/mf-geoadmin3/blob/master/src/components/UrlUtilsService.js#L80-L87 for the case where this.isCorsEnabled(url) is true then getURL may be set to something like function(resource) { return resource } see https://github.com/geoadmin/mf-geoadmin3/blob/master/src/components/UrlUtilsService.js#L95

Additional information It appears the service-proxy is unable to deliver image/png tiles - just returns 403 forbidden content-type That's why it matters to fix either this issue or to fix the service-proxy

Rdataflow avatar Jan 16 '19 10:01 Rdataflow

Danke Thomas! Wir schauen, dass dies erledigt wird.

gjn avatar Jan 16 '19 12:01 gjn

We should fix in the way that for cesium, we also check on the CORS headers (adapt as the OP suggested).

gjn avatar Jan 16 '19 12:01 gjn

agree.

danduk82 avatar Jan 16 '19 13:01 danduk82

  1. service-proxy works fine with png
  2. I would ditch entirely the proxy stuff. HTPPS and CORS are not new anymore. We always assume a provider is unable to configure correctly its server, but it never comes into mind that there may be a valid reason for not configuring CORS.

procrastinatio avatar Mar 15 '19 13:03 procrastinatio