mage4/magento2-rest-api-restriction 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2026-03-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固