跳到内容

Headless REST API Security

v2.2

Md. Rakib Ullah · 2026年1月20日 上架

Manage access to the WordPress REST API by restricting public endpoints, enabling specific route allow-listing, and handling API key authentication.

正在使用
50+
评分
5.0 / 5
累计下载
2,010
最近更新
2026年2月23日
2 条评价需要 WordPress 5.8+已测试到 6.9.12PHP 7.4+

截图

General Settings: The main configuration screen with the Master Switch and Redirect URL options.
General Settings: The main configuration screen with the Master Switch and Redirect URL options.
Route Manager: The grid view for allowing or restricting specific API namespaces and endpoints.
Route Manager: The grid view for allowing or restricting specific API namespaces and endpoints.

Running a Headless WordPress site often involves exposing the REST API. Headless REST API Security provides tools for administrators to control which endpoints are accessible to the public or external applications.

This plugin restricts public access to REST API endpoints by default and offers a settings interface to allow-list only the specific routes required by a frontend application (such as Next.js, Gatsby, or mobile apps).

Features

  • Access Control: Restrict default public access to REST API endpoints.
  • Route Allow-Listing: Specific API routes (e.g., /wp/v2/posts) can be enabled while others remain restricted.
  • API Key Authentication: Supports an X-API-KEY header for server-to-server or frontend requests.
  • Headless Redirect: Option to redirect users accessing the backend API URL to a specified frontend domain.
  • Admin Access: Logged-in Administrators and Editors retain access to the API to support the Block Editor (Gutenberg) functionality.
  • Plugin Support: Detects routes registered by third-party plugins for configuration.

Usage

  1. Navigate to Settings > Headless Security in the WordPress dashboard.
  2. Enable the Master Switch to activate the access restrictions.
  3. Review the list of REST API routes and check the Allow box for endpoints the application requires.
  4. Copy the generated API Key for use in application headers.
  5. (Optional) Enter a Headless Frontend URL to configure redirects for visitors.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums