The problem is this: I am sending an ajax JSON directory request, but the answer always comes with a status of 200.
request code:
public function getDataAjaxAction(Request $request){ $data = $this->getDoctrine()->getRepository('AppBundle:Land')->find(0); $response = new JsonResponse($data->getJSON()); $response->setEtag(md5($response->getContent())); $response->setPublic(); $response->isNotModified($request); return $response; } app.php:
$loader = require __DIR__.'/../app/autoload.php'; include_once __DIR__.'/../var/bootstrap.php.cache'; $kernel = new AppKernel('prod', false); $kernel = new AppCache($kernel); Request::enableHttpMethodParameterOverride(); $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response); nginx server
Tell me, please, what could be the error or how to find it.