<div dir="auto">Hi Andrea,<div dir="auto"><br></div><div dir="auto">What you require is already supported in MapProxy. In the documentation Oliver linked (<a href="https://mapproxy.org/docs/nightly/deployment.html#http-proxy">https://mapproxy.org/docs/nightly/deployment.html#http-proxy</a>) it states:</div><div dir="auto"><br></div><div dir="auto"><i>"You need to set some HTTP headers so that MapProxy can generate capability documents with the URL of the proxy, instead of the local URL of the MapProxy application."</i><br></div><div dir="auto"><i><br></i></div><div dir="auto">We (<a href="https://astuntechnology.com">https://astuntechnology.com</a>) run MapProxy in production behind Apache and an AWS Load Balancer which pass the X-Forwarded-Host and X-Forwarded-Proto headers resulting in the correct host and protocol being reported in capabilities responses.</div><div dir="auto"><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><br></span></div><div dir="auto">Hope that helps,</div><div dir="auto"><br></div><div dir="auto">Matt.</div><div dir="auto"><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:14px;background-color:rgb(255,255,255)"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, 4 Aug 2018, 06:52 Andrea Peri, <<a href="mailto:aperi2007@gmail.com">aperi2007@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Ok.<div dir="auto">However i try to explain better my point of view.</div><div dir="auto"><br><div dir="auto">I understand that mapproxy fo not support directly the https.</div><div dir="auto">This is not important because is quite simple to put a front end that recognize the https request and redirect to mapproxy using the http.</div><div dir="auto">But when mapproxy write in the getcapabikities response that the url of getmap is always in http. This is an arbitrary response. Infact this mean that all the external client that try to connect to the mapproxy read in the getcapabilities response that the connection is on an http protocol.</div><div dir="auto">Unfortunatelly if the client is working in a secured ennvironment and so use the https protocol it is locked to avoid to accept any http connection proposal because mean a potential security break.</div><div dir="auto"><br></div><div dir="auto">A simple same is to do an html page and put on it a tag IMG SRC.</div><div dir="auto"><br></div><div dir="auto">If the page is invoked using the https protocol and also the image url is in HTTPS.</div><div dir="auto">The page is correctly visualized.</div><div dir="auto">Instead if the html page is in https, but the img tag url is in http. The image is not visualized.</div><div dir="auto"><br></div><div dir="auto">This not mean the mapproxy should work in https directly. But mean that mapproxy should write in the getcapabilities response  the protocol reported in the metadata parameter setting. Not change it. Because if the connection protocol for the client is really in https or in http the mapproxy dont know it,</div><div dir="auto">It know only that him use the http. But this not mean that also the front end use the http.</div><div dir="auto">So if someone write in the metadata that the connection  is in https, this  mean that externally to the mapproxy the client is seeing and using https, not http.</div><div dir="auto"><br></div><div dir="auto">A.</div><div dir="auto"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il Ven 3 Ago 2018, 08:54 Oliver Tonnhofer <<a href="mailto:olt@omniscale.de" target="_blank" rel="noreferrer">olt@omniscale.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
> On 1. Aug 2018, at 21:51, aperi2007 <<a href="mailto:aperi2007@gmail.com" rel="noreferrer noreferrer" target="_blank">aperi2007@gmail.com</a>> wrote:<br>
<br>
> However I will go to set the solution you suggest, implement a kind of local reverse proxy.<br>
<br>
<br>
<br>
MapProxy itself does not support HTTPS, so you already have a server/proxy in front of MapProxy. That is where you need to set the X-Forwarded-Proto header <a href="https://mapproxy.org/docs/nightly/deployment.html#http-proxy" rel="noreferrer noreferrer noreferrer" target="_blank">https://mapproxy.org/docs/nightly/deployment.html#http-proxy</a><br>
<br>
<br>
Regards,<br>
Oliver<br>
<br>
-- <br>
Oliver Tonnhofer  | Omniscale GmbH & Co KG  | <a href="https://omniscale.com" rel="noreferrer noreferrer noreferrer" target="_blank">https://omniscale.com</a><br>
OpenStreetMap WMS and tile services         | <a href="https://maps.omniscale.com" rel="noreferrer noreferrer noreferrer" target="_blank">https://maps.omniscale.com</a><br>
<br>
</blockquote></div>
_______________________________________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" target="_blank" rel="noreferrer">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a></blockquote></div>