[MapProxy] issue with OnlineResource href or wrong usage?

Knaack, Ulrich Ulrich.Knaack at lgln.niedersachsen.de
Wed Aug 9 04:26:46 PDT 2017


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





More information about the MapProxy mailing list