disable service-proxy for WMTS with CORS in 3D - as already done for 2D
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
- insert GetCapabilities-URL in import & connect (i.e. https://dev.florianamoser.ch/service?REQUEST=GetCapabilities&SERVICE=WMTS) and load a layer
- view in 2D works as expected, tiles are fetched directly
- 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
Danke Thomas! Wir schauen, dass dies erledigt wird.
We should fix in the way that for cesium, we also check on the CORS headers (adapt as the OP suggested).
agree.
service-proxyworks fine withpng- I would ditch entirely the proxy stuff.
HTPPSandCORSare 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.