1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00

add cache controle using createResponse on embedJs action

This commit is contained in:
Simon Vieille 2019-02-07 10:26:42 +01:00
parent 7195609086
commit 7c32234626
No known key found for this signature in database
GPG Key ID: 03383D15A1D31745

View File

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