Hi everybody \0/
I'm using Phalcon to create micro application (API Rest/JSON) :
<?php
use Phalcon\Http\Response;
$app = new Micro($di);
$app->post('/url', function() use ($app){
...
$params = $app->request->get();
$response = new Response();
setcookie('foo', 'bar');
$response->setStatusCode(200, "OK");
$response->send();
});
this address is called by ajax request
HTTP Ajax Response :
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 11 Dec 2015 14:09:05 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: foo=bar; expires=Sun, 10-Jan-2016 14:09:04 GMT; Max-Age=2592000
access-control-allow-origin: *
Content-Encoding: gzip
But $_COOKIE stay empty...
Someone can help me to know why ?
Thank you.