Skip to content

Commit

Permalink
Merge pull request #282 from PROCERGS/issue#800
Browse files Browse the repository at this point in the history
fixed trusted headers issue
  • Loading branch information
guilhermednt authored Aug 2, 2018
2 parents cdd25fa + b8fd41a commit 407df2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$request = Request::createFromGlobals();

// This line is required after Symfony 2.8.44
Request::setTrustedHeaderName(Request::HEADER_FORWARDED, null);

$response = $stack->handle($request);
$response->send();
$kernel->terminate($request, $response);
3 changes: 3 additions & 0 deletions web/app_dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
exit('You are not allowed to access this file.');
}

// This line is required after Symfony 2.8.44
Request::setTrustedHeaderName(Request::HEADER_FORWARDED, null);

$response = $stack->handle($request);
$response->send();
$kernel->terminate($request, $response);

0 comments on commit 407df2c

Please sign in to comment.