[MapProxy] issue with OnlineResource href or wrong usage?
Oliver Tonnhofer
olt at omniscale.de
Thu Aug 10 01:42:51 PDT 2017
Hi,
you can tell MapProxy how the external URLs should look like with X-Script-Name and X-Forwarded-Host. See: https://mapproxy.org/docs/nightly/deployment.html#http-proxy
So, there should be no need to rewrite the Capabilities in your secproxy.
If you remove these headers, then MapProxy will use http://mapproxy.intern.de/mapproxy/ourMap/service/wms?
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | https://omniscale.com
OpenStreetMap WMS and tile services | https://maps.omniscale.com
> On 09.08.2017, at 13:26, Knaack, Ulrich <Ulrich.Knaack at lgln.niedersachsen.de> wrote:
>
> Hi,
>
> our mapproxy instance is running on the server mapproxy.intern.de (faked name).
> The service is reachable internally with the URL http://mapproxy.intern.de/mapproxy/ourMap/service/wms
>
> We expect this content "OnlineResource" in a WMS capabilities document:
> <Get>
> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://mapproxy.intern.de/mapproxy/ourMap/service/wms?"/>
> </Get>
>
> Our problem:
> In front of mapproxy, we use a security proxy (created by us) which performs basic authentication, authorization, registration,
> response URL rewriting (intern URL to extern URL) and response archiving of all OWS-requests.
> This security proxy forwards all checked and legal requests to mapproxy and other OWS instances in our office.
> It runs on the server "secproxy.extern.de" .
>
> The GIS clients (internet, intranet) have to reach the service "ourMap" via "http://secproxy.extern.de/sec/auth/ourMap"
>
> The content of a mapproxy response, which is sent from mapproxy to secproxy is now this:
> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://secproxy.extern.de/mapproxy/ourMap/service/wms?"/>
>
> This causes an issue in URL rewriting by secproxy, because " http://mapproxy.intern.de/mapproxy/ourMap/service/wms?"
> is expected.
> How can we get mapproxy to produce the expected OnlineResource?
>
> Our security proxy creates this HTTP header when it forwards the client request to mapproxy:
> x-forwarded-host: secproxy.extern.de
> I have the assumption, that this causes the problem.
>
> Am I right?
> Is our usage of x-forwarded-host correct?
>
> Mit freundlichen Grüßen
> Ulrich Knaack
>
>
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapproxy
More information about the MapProxy
mailing list