origo-map / origo-server

Origo server
BSD 2-Clause "Simplified" License
8 stars 16 forks source link

Add proxy server #12

Closed afogelberg closed 7 years ago

afogelberg commented 7 years ago

It would be convenient to able to use Origo server as a proxy server as well.

afogelberg commented 7 years ago

With #13 Origo server gets a built in proxy server. This can for example be used if external services lack support for cors. To use the proxy simply add the proxy url before the usual url. Defining the url for an Origo source could look like this example for a wms from sgu:

    "sgu": {
      "url": "http://<hostname>/origoserver/proxy?url=http://maps3.sgu.se/geoserver/jord/ows"
    }

Furthermore proxy examples are included for password protected services. Two examples are included in Origo server for Lantmäteriet wms services. In these special cases authentication is defined in Origo server. Defining the source in Origo can look like this:

    "lm": {
      "url": "http://<host>/origoserver/lmproxy/topowebb/v1/wmts",
      "matrixIdsPrefix": "",
      "matrixSet": "3006"
    }