Commit 10884870 authored by Fabien Potencier's avatar Fabien Potencier

merged branch marcw/doc-patch-1 (PR #224)

Commits
-------

58fc60f3 Adds doc about proxy headers trust

Discussion
----------

Adds doc about proxy headers trust

---------------------------------------------------------------------------

by igorw at 2011/12/21 07:07:57 -0800

No instantiation needed, just call it statically on the request class:

    Request::trustProxyData();

If there is something about this in the Symfony2 docs, it'd be nice to link to it.

---------------------------------------------------------------------------

by marcw at 2011/12/21 07:19:53 -0800

Well this is a configuration parameter in Symfony2...
parents ffe8f9fc 58fc60f3
......@@ -45,6 +45,16 @@ are using apache you can use a ``.htaccess`` file for this.
$app['debug'] = true;
.. tip::
If your application is hosted behind a reverse proxy and you want Silex
to trust the `X-Forwarded-For*` headers, you will need to run your application
like this::
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
$request::trustProxyData();
$app->run($request);
Routing
-------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment