diff --git a/Model/CorsCheck.php b/Model/CorsCheck.php index fb02da3..2e2176d 100644 --- a/Model/CorsCheck.php +++ b/Model/CorsCheck.php @@ -13,6 +13,15 @@ */ class CorsCheck implements CorsCheckInterface { + /** + * @var \Magento\Framework\Webapi\Rest\Response $response + */ + private $response; + + /** + * @var \Magento\Framework\Webapi\Rest\Request $request + */ + private $request; /** * Initialize dependencies. diff --git a/Plugin/CorsRequestOptionsPlugin.php b/Plugin/CorsRequestOptionsPlugin.php index 789d652..7364655 100644 --- a/Plugin/CorsRequestOptionsPlugin.php +++ b/Plugin/CorsRequestOptionsPlugin.php @@ -22,7 +22,7 @@ class CorsRequestOptionsPlugin * Allow Options requests from jQuery AJAX * * @param Request $subject - * @return void + * @return string * @throws InputException */ public function aroundGetHttpMethod( @@ -34,4 +34,4 @@ public function aroundGetHttpMethod( return $subject->getMethod(); } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index b13fcad..1833bd7 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Enabling cross-origin resource sharing (CORS) requests to Magento 2 API from configured Origin domain", "homepage": "https://github.com/splashlab/magento-2-cors-requests", "type": "magento2-module", - "version": "100.0.7", + "version": "100.0.8", "license": [ "OSL-3.0", "AFL-3.0" @@ -13,8 +13,9 @@ "source": "https://github.com/splashlab/magento-2-cors-requests" }, "require": { - "php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.1.0", - "magento/framework": "*" + "php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.1.0||~8.2.0||~8.3.0", + "magento/framework": "*", + "magento/module-webapi": "*" }, "autoload": { "files": [