[WordPress] 外掛分享: Birim REST Lock

首頁 › 外掛目錄 › Birim REST Lock
WordPress 外掛 Birim REST Lock 的封面圖片
全新外掛
安裝啟用
—
尚無評分
剛更新
最後更新
—
問題解決
WordPress 6.0+ PHP 7.4+ v1.0.0 上架:2026-10-29

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Birim REST Lock」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WordPress exposes a public REST API at /wp-json/. Anyone can list your users, your installed plugins’ endpoints and your content. Birim REST Lock closes it without breaking your site.

Allowlist mode (default): block every route except the ones you list.
Blocklist mode: allow every route except the ones you list.
Wildcards: /wp/v2/posts* covers /wp/v2/posts and /wp/v2/posts/123.
Role rules: apply the same rules to logged-in roles you choose, such as subscribers or customers. Administrators are never blocked.
Stop username enumeration: always block /wp/v2/users.
Hide what you run: block the route index and namespace listings, and remove REST links from page HTML, the Link header and RSD.
Safe defaults: Contact Form 7, WooCommerce block checkout, oEmbed and Jetpack routes are allowed out of the box. CORS preflight (OPTIONS) requests pass through, so token logins keep working.
One-click import from Disable REST API: moves your logged-out allowlist and managed roles across.
Lightweight: one file, works on PHP 7.4 and up, no tracking, no external requests, no ads.

For developers

birim_rest_lock_blocked filter: ( bool $blocked, string $route, WP_REST_Request $request ) to override the decision.
birim_rest_lock_message filter: change the error message.

延伸相關外掛

文章
Filter
Mastodon