Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow WMS GetMap requests through the MapStore proxy #8113

Closed
tdipisa opened this issue Apr 19, 2022 · 0 comments
Closed

Allow WMS GetMap requests through the MapStore proxy #8113

tdipisa opened this issue Apr 19, 2022 · 0 comments

Comments

@tdipisa
Copy link
Member

tdipisa commented Apr 19, 2022

Description

MapStore is preventing you to add sources in HTTP when you are in HTTPs to avoid mixed content issues. We implemented this through #6127. This is due to a browser security constraint (eg. Chrome from v81 tries to upgrade the http request to https and blocks them by default if they fail to load over https, see also here).

Through this issue it is requested to let certain OGC requests (like GetMap requests) to pass through the MapStore proxy.

Acceptance criteria

From our preliminary tests the proxy should already work for the purpose of this task. Anyway there, given the proxy is ok we need to:

  • Allow to add catalog in http-not-secure
  • Allow WMS layers to load tiles
  • Do not support other type of protocol for the moment (TMS, WMTS... ) because these require additional work on specific implementations

In order to support what requested for this task, we need to change several things here and there on MapStore UI:

  • Add a flag in the UI of advanced options of catalog of type WMS and WFS. Let's call it in the UI "Allow not secure layers". Option in catalog should be "allowUnsecureLayers"
  • A WFS layer, with the fix above, should work. To be checked
  • Also WMS with Cesium should work, because they already use the proxy. To be checked
  • In case a WMS layer has been added using a catalog, a flag forceProxy: true option in the layer should be added. This option forces the layer to use the proxy and load the data, instead of doing a direct request. Only Openlayers supports this parameter, Leaflet doesn't, therefore mobile maps will not work if that option is set to true

This option has to be :

  • Documented on MapStore
  • Saved in map (there is a filter of savable options) and so restored in a second time when the map is loaded
  • Fixed in implementation (Openlayers has some implementation but is partially overridden by other things, so it is not fully working).
  • The flag should be added to the display tab of layer setting to allow to enable/disable in a second time at layer level

Other useful information

Services to test:
http://www.rendis.isprambiente.it/geoserver/wms
http://www.rendis.isprambiente.it/geoserver/wfs

@tdipisa tdipisa added New Feature used for new functionalities Priority: High labels Apr 19, 2022
@tdipisa tdipisa changed the title Allow WMS/WFS request through the MapStore proxy Allow WMS GetMap requests through the MapStore proxy Apr 19, 2022
dsuren1 added a commit to dsuren1/MapStore2 that referenced this issue Apr 27, 2022
dsuren1 added a commit that referenced this issue Apr 28, 2022
* #8113: Allow unsecured source from catalog and force proxy

* Added tooltip to unsecure option

* Code refactor

* Save forceProxy option in map
@ElenaGallo ElenaGallo self-assigned this Jun 13, 2022
@offtherailz offtherailz added this to the v2022.02.00 milestone Sep 28, 2022
@tdipisa tdipisa added enhancement and removed New Feature used for new functionalities labels Sep 28, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants