camptocamp / GeoMapFish

6 stars 1 forks source link

Use main_ogc_server in WMS URL #43

Closed jwkaltz closed 3 months ago

jwkaltz commented 3 years ago

Who requested this new feature?

Kanton Schwyz

Is your feature request related to a problem?

Yes: the consumers of the Kanton Schwyz WMS were accustomed to using URLs without extra parameter "ogcserver" from GMF 1 and GMF 2.2. Now the main_ogc_server configured in the project is no longer used by GMF for the WMS URL, and "ogcserver" always needs to be added as parameter. Since Kanton Schwyz wishes its URLs to be as simple and stable as possible, a temporary workaround was put in place, as a rewrite rule in the Apache entry point; but this is a risky solution regarding next migrations, maintainability, and content changes in the admin interface.

Describe the solution you'd like

The main_ogc_server configured in the project should be used for the WMS calls as well. If the caller does not provide a ogcserver parameter, then GMF shall use the main_ogc_server.

Additional information or points to watch out for

ralphschulerSZ commented 3 years ago

If we cannot remove the URL-parameter 'ogcserver', would it at least be possible to configure the server in order the paramater would be accepted in uppercase ('OGCSERVER')?

This URL works: https://map.geo.sz.ch/mapserv_proxy?ogcserver=source+for+image/png&REQUEST=GetCapabilities&LANG=de&VERSION=1.3.0&SERVICE=WMS

This one gives an error message: https://map.geo.sz.ch/mapserv_proxy?OGCSERVER=source+for+image/png&REQUEST=GetCapabilities&LANG=de&VERSION=1.3.0&SERVICE=WMS

remyguillaume commented 1 year ago

I agree that this parameter in all URL is a bit painful. @sbrunner I think we should discuss this during the next PSC. There should be a simple way to set a default value somewhere.

jwkaltz commented 3 months ago

Implemented in #10275 and #10297