Начало вопроса
Прописал в конфиге:
web_profiler:
toolbar: true
position: bottom
intercept_redirects: false
excluded_ajax_paths: ^/bundles|^/_wdt
не помогло
Контроллер
class DefaultController extends Controller
{
public function indexAction()
{
$request = $this->get('request');
return new Response(var_dump($request->isXmlHttpRequest()));
}
}
js скрипт
$("#ajax").click(function(){
$.ajax({
type: "GET",
url: "/app_dev.php/admin",
headers: {'X-Requested-With': 'XMLHttpRequest'},
success: function(msg){
alert(msg);
},
error: function(msg){
console.log(msg);
},
});
});