Skip to content

Instantly share code, notes, and snippets.

@lorenzo
Created May 23, 2016 21:10
Show Gist options
  • Save lorenzo/6e82b9514da784381cc36259ea0d22d1 to your computer and use it in GitHub Desktop.
Save lorenzo/6e82b9514da784381cc36259ea0d22d1 to your computer and use it in GitHub Desktop.
<?php
namespace App\Routing\Filter;
use Cake\Event\Event;
use Cake\Routing\Dispatcherfilter;
class TrustProxyFilter extends DispatcherFilter
{
/**
* {inheritDoc}
*/
public function beforeDispatch(Event $event)
{
$event->data['request']->trustProxy = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment