<div dir="ltr">Hmmm... so if path_info contains exactly one value, use it for the map= value. I could get behind that. Nice and clean.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 6, 2023 at 7:22 AM Seth G <<a href="mailto:sethg@geographika.co.uk">sethg@geographika.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi devs,<br>
<br>
The OGC Features API introduced in MapServer 8.0 allows accessing Mapfiles using keys in the config file:<br>
<br>
URL: <a href="http://example.com/mykey/ogcapi/collections/foo/items" rel="noreferrer" target="_blank">http://example.com/mykey/ogcapi/collections/foo/items</a>.<br>
Config file:<br>
<br>
CONFIG<br>
  MAPS<br>
    mykey "/path/to/mapfile"<br>
  END<br>
END<br>
<br>
For all other requests you have to use the format <a href="http://example.com/?map=mykey&request=WMS." rel="noreferrer" target="_blank">http://example.com/?map=mykey&request=WMS.</a>..<br>
<br>
I think it would be nice to be able to use the same approach as OGC Features API to allow the key to be used as part of the URL e.g. a WMS request could be accessed using: <a href="http://example.com/mykey/?request=WMS." rel="noreferrer" target="_blank">http://example.com/mykey/?request=WMS.</a>..<br>
<br>
The changes to allow this seem to be minimal (with work to be done on tests and docs) - see [1]<br>
<br>
Does anyone have any thoughts or reservations on adopting this approach?<br>
<br>
Seth<br>
<br>
[1] <a href="https://github.com/MapServer/MapServer/compare/main...geographika:mapserver:mapfile-key-url" rel="noreferrer" target="_blank">https://github.com/MapServer/MapServer/compare/main...geographika:mapserver:mapfile-key-url</a><br>
<br>
<br>
--<br>
web:<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a><br>
twitter: @geographika<br>
_______________________________________________<br>
MapServer-dev mailing list<br>
<a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
</blockquote></div>