Hi Andrea, It is working at the moment, and I’m not sure why, maybe it’s docker related, maybe it’s just me☺.
One other little thing is, that everything gets lowercased so http://${X-Forwarded-Host}/RANDOM/path<http://$%7bX-Forwarded-Host%7d/RANDOM/path> becomes http://somehost.org/random/path. Noting it here so that future users will know about it. Maybe I should update the documentation? // Jonas From: Andrea Aime <andrea.a...@geo-solutions.it> Sent: 23. juli 2019 15:25 To: Jonas Nygaard Pedersen <jo...@sdfe.dk>; GeoServer Mailing List List <geoserver-users@lists.sourceforge.net> Subject: Re: [Geoserver-users] Problems using base proxy url and headers I've put the user list back in CC (as per user list usage guidelines, see http://geoserver.org/comm/userlist-guidelines.html ) In 2.15.x the replacement machinery is there... did not write it, not that familiar with it, but looking at the code it seems like it won't change the proxy base URL in case the variable required are not found in the incoming request headers, see here: https://github.com/geoserver/geoserver/blob/2.15.x/src/main/src/main/java/org/geoserver/ows/ProxifyingURLMangler.java#L141 This behavior is documented, see here: https://docs.geoserver.org/stable/en/user/configuration/globalsettings.html#use-headers-for-proxy-url So wondering, are you sure the requests GeoServer is receiving do contain the X-Forwarded-Host HTTP headder? Cheers Andrea On Tue, Jul 23, 2019 at 2:55 PM Jonas Nygaard Pedersen <jo...@sdfe.dk<mailto:jo...@sdfe.dk>> wrote: This is for geoserver 2.15.0, but I have also tried 2.15.2. with the same result. // Jonas From: Andrea Aime <andrea.a...@geo-solutions.it<mailto:andrea.a...@geo-solutions.it>> Sent: Tuesday, July 23, 2019 2:50 PM To: Jonas Nygaard Pedersen <jo...@sdfe.dk<mailto:jo...@sdfe.dk>> Cc: geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net> Subject: Re: [Geoserver-users] Problems using base proxy url and headers What version of GeoServer are you using? Cheers Andrea On Tue, Jul 23, 2019 at 12:10 PM Jonas Nygaard Pedersen <jo...@sdfe.dk<mailto:jo...@sdfe.dk>> wrote: Hi List I'm trying to change the proxy base url using proxy headers but none of the supported headers seem to work (https://docs.geoserver.org/latest/en/user/configuration/globalsettings.html#proxy-base-url). If for example I change it to http://${X-Forwarded-Host}/random/path<http://$%7bX-Forwarded-Host%7d/random/path> it doesn't seem to change the values for the ows:Get and ows:Post xlink:href and the value is still just http://servername.org:8092/wfs. No matter which of the supported headers I try, none of them actually changes the output. If I hardcode a Base proxy URL like http://someotherserver.org/random/path it will change the value of the ows:Get and ows:Post xlink:href to http://someotherserver.org/random/path/wfs Does anyone have a clue as to what I'm doing wrong? My global.xml look like this: <?xml version="1.0" encoding="UTF-8"?><global> <settings> <id>SettingsInfoImpl-68f6c583:154ca420c47:-8000</id> <contact> <addressCity>Copenhagen</addressCity> <addressCountry>Denmark</addressCountry> <addressType>Work</addressType> <contactEmail>s...@sdfe.dk<mailto:s...@sdfe.dk></contactEmail> <contactOrganization>Styrelsen for Dataforsyning og Effektivisering</contactOrganization> <contactPerson>all</contactPerson> <contactPosition>__</contactPosition> </contact> <charset>UTF-8</charset> <numDecimals>8</numDecimals> <onlineResource>http://geoserver.org</onlineResource> <proxyBaseUrl>http://${X-Forwarded-Host}/random/path</proxyBaseUrl<http://$%7bX-Forwarded-Host%7d/random/path%3c/proxyBaseUrl>> <verbose>false</verbose> <verboseExceptions>false</verboseExceptions> <localWorkspaceIncludesPrefix>false</localWorkspaceIncludesPrefix> </settings> <jai> <allowInterpolation>false</allowInterpolation> <recycling>false</recycling> <tilePriority>5</tilePriority> <tileThreads>7</tileThreads> <memoryCapacity>0.5</memoryCapacity> <memoryThreshold>0.75</memoryThreshold> <imageIOCache>false</imageIOCache> <pngAcceleration>true</pngAcceleration> <jpegAcceleration>true</jpegAcceleration> <allowNativeMosaic>false</allowNativeMosaic> <allowNativeWarp>false</allowNativeWarp> </jai> <coverageAccess> <maxPoolSize>10</maxPoolSize> <corePoolSize>5</corePoolSize> <keepAliveTime>30000</keepAliveTime> <queueType>UNBOUNDED</queueType> <imageIOCacheThreshold>10240</imageIOCacheThreshold> </coverageAccess> <updateSequence>152</updateSequence> <featureTypeCacheSize>0</featureTypeCacheSize> <globalServices>true</globalServices> <useHeadersProxyURL>true</useHeadersProxyURL> <xmlPostRequestLogBufferSize>1024</xmlPostRequestLogBufferSize> </global> // Jonas Jonas Nygaard Pedersen D. +45 72 54 55 10 E. jo...@sdfe.dk<mailto:jo...@sdfe.dk> [Energi-, Forsynings- og Klimaministeriet] Styrelsen for Dataforsyning og Effektivisering Rentemestervej 8 2400 København NV T. +45 7254 5500 W. www.sdfe.dk<http://www.sdfe.dk/> _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail. -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users