public function init()
    {
        parent::init();

        //catch preflight request
        if ($this->request->httpMethod() === 'OPTIONS') {
            $answer = $this->answer(null, true);
            $answer->output();
            exit;
        }
    }