mage4/magento2-rest-api-restriction
最新稳定版本:1.2.0
Composer 安装命令:
composer require mage4/magento2-rest-api-restriction
包简介
Restrict/Disabled Rest API Endpoints.
关键字:
README 文档
README
Overview
Mage4 Rest API Restriction is a Magento 2 extension that allows store administrators to disable selected REST API endpoints without modifying core code or creating endpoint-specific plugins.
The module provides a generic admin configuration where blocked REST API endpoints can be listed one per line. When a request matches one of the configured endpoint patterns, the module throws a 403 Forbidden API response with a clear error message.
This extension is useful for merchants and developers who want to harden API access, disable unused endpoints, or temporarily restrict selected REST routes.
Install via composer
composer require mage4/magento2-rest-api-restriction
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Features
- Enable or disable the module from Magento admin
- Restrict specific Magento REST API endpoints
- Configure blocked endpoints from Stores > Configuration > MAGE4 EXTENSIONS > REST API RESTRICTION
- Supports Magento-style route placeholders such as:
:cartId:sku:attributeCode
- Returns a proper JSON API error response
- Uses a generic validation approach instead of endpoint-specific plugins
- Helps improve API security by disabling unnecessary REST endpoints
Supported Endpoint Pattern Examples
You can configure blocked endpoints like:
/V1/customers/me
/V1/guest-carts/:cartId
/V1/guest-carts/:cartId/totals
/V1/products/:sku
/V1/products/:sku/options
/V1/products/attributes/:attributeCode/is-filterable/:isFilterable
About us
We’re an innovative development agency building awesome websites, webshops and web applications with Latest Technologies. Check out our website mage4.com or email us at contact@mage4.com | rehan@mage4.com.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2026-03-31