behind a reverse proxy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

behind a reverse proxy

Horacio Degiorgi
I'm installing vufind begind a reverse proxy. 
I expected that vufind will use the [SITE] url  from config in the different templates (for example /usr/local/vufind/themes/root/templates/Email/record.phtml )
but the method $this->serverUrl take the value of $_SERVER['HTTP_HOST'] instead of the value fron config.
is that the excepted behavior ?


Lic. Horacio Degiorgi
http://bdigital.uncu.edu.ar
http://sid.uncu.edu.ar
Mendoza - Argentina

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
VuFind-General mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: behind a reverse proxy

Demian Katz

Hello,

 

That is the expected behavior – VuFind is designed to use $_SERVER[‘HTTP_HOST’] rather than the config.ini setting. That setting is only used in places where the host cannot be auto-detected (for example, during command line sitemap generation).

 

However, note that the serverUrl view helper should be handling HTTP_X_FORWARDED_HOST headers. See this code:

 

https://github.com/zendframework/zend-view/blob/master/src/Helper/ServerUrl.php#L171

 

You may wish to check whether your reverse proxy is sending appropriate headers through….

 

- Demian

 

From: Horacio Degiorgi [mailto:[hidden email]]
Sent: Wednesday, July 19, 2017 7:11 PM
To: [hidden email]
Subject: [VuFind-General] behind a reverse proxy

 

I'm installing vufind begind a reverse proxy. 

I expected that vufind will use the [SITE] url  from config in the different templates (for example /usr/local/vufind/themes/root/templates/Email/record.phtml )

but the method $this->serverUrl take the value of $_SERVER['HTTP_HOST'] instead of the value fron config.

is that the excepted behavior ?

 

Lic. Horacio Degiorgi
http://bdigital.uncu.edu.ar
http://sid.uncu.edu.ar
Mendoza - Argentina


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
VuFind-General mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-general
Loading...