Skip to content

Instantly share code, notes, and snippets.

@mehdichaouch
Created July 15, 2015 08:20
Show Gist options
  • Save mehdichaouch/9c6678ee861b30cd070f to your computer and use it in GitHub Desktop.
Save mehdichaouch/9c6678ee861b30cd070f to your computer and use it in GitHub Desktop.
Toran proxy

Toran Proxy how to!

Disable CSRF

Apply the snippet :

, array(
    'csrf_protection' => false,
)

to those files, like this:

./toran/src/Toran/ProxyBundle/Controller/HomeController.php (197):

$data['packagist_sync'] = (bool) $data['packagist_sync'];

$form = $this->createFormBuilder($data, array(
        'csrf_protection' => false
    ))

./toran/src/Toran/ProxyBundle/Controller/PackagistController.php (37):

{
    $data = array('packages' => '');
    $form = $this->createFormBuilder($data, array(
            'csrf_protection' => false,
        ))

./toran/src/Toran/ProxyBundle/Controller/RepoController.php (182):

);

$form = $this->createFormBuilder($data, array(
        'csrf_protection' => false,
    ))
@eddiejaoude
Copy link

Thanks! I turned it off (false) in the config & it solved the issue csrf error.

# app/config/config.yml
framework:
   # ...
   csrf_protection: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment