protected function initCors()
    {
        $headers = Yii::$app->getResponse()->getHeaders();
        
        $headers->set('Access-Control-Allow-Headers', implode(', ', [
            'Content-Type',
            $this->apiKeyParam,
            'Authorization',
        ]));
        $headers->set('Access-Control-Allow-Methods', 'GET, POST, DELETE, PUT');
        $headers->set('Access-Control-Allow-Origin', '*');
    }