Hi Nuno,

Somehow the problem has fixed itself, and I’m not quite sure why, but I’ll 
investigate further when time permits.
Maybe there’s something in our docker setup that I don’t understand…

Anyways, thanks for looking into it.

// Jonas

From: Nuno Oliveira <nuno.olive...@geo-solutions.it>
Sent: 23. juli 2019 15:30
To: Jonas Nygaard Pedersen <jo...@sdfe.dk>; 
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Problems using base proxy url and headers

Hi Jonas,
just did a test with master using WMS 1.3.0, a few comments:

Using a template like yours 
http://${X-Forwarded-Host}/random/path<http://$%7bX-Forwarded-Host%7d/random/path>
 works fine, test request:
curl -v --header "http://X-Forwarded-Host: some-host" 
"http://localhost:8060/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities";<http://localhost:8060/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities%22>

Make sure you check the Use headers for Proxy URL check-box.

That say, looks like using multiple variable int he template doens't work.

Hope it helps,
Nuno Oliveira


On Tue, 2019-07-23 at 10:01 +0000, Jonas Nygaard Pedersen 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</contactEmail<mailto:s...@sdfe.dk%3c/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<http://geoserver.org%3c/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,

Nuno Oliveira

==

GeoServer Professional Services from the

experts!

Visit http://goo.gl/it488V for more information.

==



Nuno Miguel Carvalho Oliveira

@nmcoliveira

Software Engineer



GeoSolutions S.A.S.

Via di Montramito 3/A

55054  Massarosa (LU)

Italy

phone: +39 0584 962313

fax:      +39 0584 1660272



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

Reply via email to