On Tuesday, January 17, 2012 10:17:51 PM UTC+7, euromark wrote:
I moved a project from a managed server to a server with some proxy--
routing (apache mod_proxy).
But now request::referer() is always the domain itself (not the actual
referrer url) due to
$ref = env('HTTP_REFERER');
$forwarded = env('HTTP_X_FORWARDED_HOST');
if ($forwarded) {
$ref = $forwarded;
}
The proxy setup is:
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://192.../
ProxyPassReverse / http://192..../
HTTP_REFERER is set to the correct value "domain.com/some/action/with/
params"
HTTP_X_FORWARDED_HOST, though, is only "domain.com"
why would cake use the host name here instead of sticking to the
obviously correct referrer url?
thx for any clarification
I would like to avoid hacking the core method of the request class.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment