Browse Source

Cache remove on pages with form

dev-master
Simon Vieille 2 years ago
parent
commit
4ee4311c1a
No known key found for this signature in database GPG Key ID: 919533E2B946EA10
3 changed files with 5 additions and 1 deletions
  1. +2
    -0
      src/Gist/Controller/EditController.php
  2. +2
    -0
      src/Gist/Controller/LoginController.php
  3. +1
    -1
      src/Gist/Controller/MyController.php

+ 2
- 0
src/Gist/Controller/EditController.php View File

@ -60,6 +60,7 @@ class EditController extends Controller
array(
'gist' => isset($gist) ? $gist : null,
'form' => $form->createView(),
'no_cache' => true,
)
);
}
@ -109,6 +110,7 @@ class EditController extends Controller
}
$viewOptions['form'] = $form->createView();
$viewOptions['no_cache'] = true;
return $this->createResponse('Edit/clone.html.twig', $viewOptions);
}


+ 2
- 0
src/Gist/Controller/LoginController.php View File

@ -63,6 +63,7 @@ class LoginController extends Controller
'form' => $form->createView(),
'error' => isset($error) ? $error : '',
'success' => isset($success) ? $success : '',
'no_cache' => true,
]
);
}
@ -102,6 +103,7 @@ class LoginController extends Controller
[
'form' => $form->createView(),
'error' => isset($error) ? $error : '',
'no_cache' => true,
]
);
}


+ 1
- 1
src/Gist/Controller/MyController.php View File

@ -63,7 +63,7 @@ class MyController extends Controller
if (empty($apiKey)) {
$regenerateApiKey = true;
}
}
// FIXME: CSRF issue!
elseif ($request->request->get('apiKey') === $apiKey && $request->request->has('generateApiKey')) {
$regenerateApiKey = true;


Loading…
Cancel
Save