, , , , . . X_FORWARDED_HOST, , . , , getHost , HOST, SERVER_NAME , , SERVER_ADDR.
- HOST, , getHost:
$request = $this->get('request');
$request->headers->set('HOST', 'yourhosthere');
$request->getHost();
As I said, I'm not sure that this will solve the problem, because the error you mentioned tells us that the template is trying to get the index value HTTP_HOST, but it is not defined. If you look at the methods $request->getHostand $request->getHttpHost, I don’t see anything trying to get a value that has HTTP_HOSTan index, but I could skip it. Could you place the file ::base.html.twigto see if the problem might lie there.
Regards, Matt
source
share