Browse Source

add cache controle using createResponse on embedJs action

dev-master
Simon Vieille 2 years ago
parent
commit
7c32234626
Signed by: deblan GPG Key ID: 03383D15A1D31745
1 changed files with 4 additions and 7 deletions
  1. +4
    -7
      src/Gist/Controller/ViewController.php

+ 4
- 7
src/Gist/Controller/ViewController.php View File

@ -72,13 +72,10 @@ class ViewController extends Controller
{
$viewOptions = $this->getViewOptions($request, $gist, $commit);
return new Response(
$this->render('View/embedJs.html.twig', $viewOptions),
200,
array(
'Content-Type' => 'text/javascript',
)
);
$response = $this->createResponse('View/embedJs.html.twig', $viewOptions),
$response->headers->set('Content-Type', 'text/javascript');
return $response;
}
/**


Loading…
Cancel
Save