Join GitHub today
Fix surrogate not using original request #27309
Warning: This might need some close attention. It took me hours to wrap my head around that issue :-)
So the problem is that
$subRequest = Request::create($uri, Request::METHOD_GET, array(), $cache->getRequest()->cookies->all(), array(), $cache->getRequest()->server->all());
What you can see here, is that it uses
What we should do instead is duplicate the original request so the surrogates can actually behave like a real reverse proxy such as Varnish would by keeping all the original request attributes.