@@ -88,7 +88,7 @@ public function panelAction(Request $request, $token)
88
88
}
89
89
90
90
if (!$ profile = $ this ->profiler ->loadProfile ($ token )) {
91
- return new Response ( $ this ->twig -> render ( '@WebProfiler/Profiler/info.html.twig ' , ['about ' => 'no_token ' , 'token ' => $ token , 'request ' => $ request]), 200 , [ ' Content-Type ' => ' text/html ' ]);
91
+ return $ this ->renderWithCspNonces ( $ request , '@WebProfiler/Profiler/info.html.twig ' , ['about ' => 'no_token ' , 'token ' => $ token , 'request ' => $ request ]);
92
92
}
93
93
94
94
if (null === $ panel ) {
@@ -111,7 +111,7 @@ public function panelAction(Request $request, $token)
111
111
throw new NotFoundHttpException (sprintf ('Panel "%s" is not available for token "%s". ' , $ panel , $ token ));
112
112
}
113
113
114
- return new Response ( $ this ->twig -> render ( $ this ->getTemplateManager ()->getName ($ profile , $ panel ), [
114
+ return $ this ->renderWithCspNonces ( $ request , $ this ->getTemplateManager ()->getName ($ profile , $ panel ), [
115
115
'token ' => $ token ,
116
116
'profile ' => $ profile ,
117
117
'collector ' => $ profile ->getCollector ($ panel ),
@@ -121,7 +121,7 @@ public function panelAction(Request $request, $token)
121
121
'templates ' => $ this ->getTemplateManager ()->getNames ($ profile ),
122
122
'is_ajax ' => $ request ->isXmlHttpRequest (),
123
123
'profiler_markup_version ' => 2 , // 1 = original profiler, 2 = Symfony 2.8+ profiler
124
- ]), 200 , [ ' Content-Type ' => ' text/html ' ]) ;
124
+ ]);
125
125
}
126
126
127
127
/**
@@ -252,7 +252,7 @@ public function searchResultsAction(Request $request, $token)
252
252
$ end = $ request ->query ->get ('end ' , null );
253
253
$ limit = $ request ->query ->get ('limit ' );
254
254
255
- return new Response ( $ this ->twig -> render ( '@WebProfiler/Profiler/results.html.twig ' , [
255
+ return $ this ->renderWithCspNonces ( $ request , '@WebProfiler/Profiler/results.html.twig ' , [
256
256
'request ' => $ request ,
257
257
'token ' => $ token ,
258
258
'profile ' => $ profile ,
@@ -265,7 +265,7 @@ public function searchResultsAction(Request $request, $token)
265
265
'end ' => $ end ,
266
266
'limit ' => $ limit ,
267
267
'panel ' => null ,
268
- ]), 200 , [ ' Content-Type ' => ' text/html ' ]) ;
268
+ ]);
269
269
}
270
270
271
271
/**
@@ -367,11 +367,11 @@ public function openAction(Request $request)
367
367
throw new NotFoundHttpException (sprintf ('The file "%s" cannot be opened. ' , $ file ));
368
368
}
369
369
370
- return new Response ( $ this ->twig -> render ( '@WebProfiler/Profiler/open.html.twig ' , [
370
+ return $ this ->renderWithCspNonces ( $ request , '@WebProfiler/Profiler/open.html.twig ' , [
371
371
'filename ' => $ filename ,
372
372
'file ' => $ file ,
373
373
'line ' => $ line ,
374
- ]), 200 , [ ' Content-Type ' => ' text/html ' ]);
374
+ ]);
375
375
}
376
376
377
377
/**
0 commit comments