[mapserver-users] dynamic ows_serviceurl

Paul genuchten at yahoo.com
Tue Apr 12 02:56:00 PDT 2022


hi list, this has probably been discussed before, but maybe there are updates (on v8?)
we would like to extract the ows_onlineresource from the environment, instead of having an administrator to configure it on the mapfile
currently we implement a hack where the webserver layer sends an additional query parameter `ows_url` to mapserver which contains the current url
in the mapfile this is implemented as 
```WEB
    VALIDATION
      "ows_url" "(\b(https?|ftp|file)://)?[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"
    END
    
    METADATA
      "ows_onlineresource"               "%ows_url%"
    END
END```
I wonder if others run into similar challenges, or if there are much more simple best practices for this case.
I can imagine allowing a environment parameter 'proxy-url' like geoserver would make sense, but it should allow some kind of template, eg:
```PROXY-URL https://example.com/cgi-bin/mapserv?map={map}.map```
which in our case would be 
```PROXY-URL https://example.com/cgi-bin/{map}```
Thank you, Paul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220412/5c8bd437/attachment.html>


More information about the MapServer-users mailing list