I'm using AJAX post request to set session values with Laravel 5.4 :
$.post('http://www.example.com/api/setSessionValue', {
  "data": data
})
public function setSessionValue() {
    $data = Input::get('data');
    // ...
    Session::put('value', $data);
}
But my value is never set in session, or set but non persistent.
I can't understand why since I'm already using session in the same way in my Laravel project, and it's working fine.
EDIT:
I forgot to specify that in in development mode (artisan serve), it's working absolutely fine.
 
    