Does one thing: Completely disables the WordPress REST API for visitors who are not logged into WordPress. No configuration required.
Important: This plugin completely disables the WP REST API for visitors who are NOT logged in to WordPress. So not recommended if your site needs the WP REST API for any non-logged users.
👉 The fast, simple way to prevent abuse of your site’s REST/JSON API 👉 Protects your site’s REST data from all non-logged users and bots 👉 Uses only 4KB of code, so super lightweight, fast, and effective
外掛特色
- 為未登入的使用者停用 REST/JSON
- 為全部使用者停用 HTTP 回應中的 REST 標頭
- 為全部使用者停用 HTML 標頭中的 REST 連結
- 完全隨裝即用,設定後不需後續管理
How does it work?
This plugin completely disables the WP REST API unless the user is logged into WordPress.
- 對已登入的使用者來說,WP REST API 會正常執行
- 對未登入/以登出的使用者來說,WP REST API 會是停用狀態
至於已登出/未登入的使用者產生 JSON/REST 要求後,他們會收到以下訊息:
rest_login_required: REST API restricted to authenticated users.
這個訊息可透過篩選器勾點 disable_wp_rest_api_error 進行自訂,請參考這篇文章的範例了解如何使用這個篩選器勾點。
隱私權
這個外掛不會收集或儲存任何使用者資料。它不會設定任何 Cookie,也不會連線至任何第三方位置,因此它不會透過任何方式侵犯使用者隱私。相反的,這個外掛可以改善使用者隱私,因為它可以保護潛在的敏感資訊不會透過 TEST API 顯示/存取。
Disable WP REST API 由具備 15 年 WordPress 開發者及書籍作者經驗的 Jeff Starr 開發及維護。
支持這個外掛的開發工作
因為喜愛 WordPress 社群,因此我開發並維護這個免費外掛。如果想要支持外掛開發工作,請贊助開發工作或購買我撰寫的書籍:
- The Tao of WordPress
- Digging into WordPress
- .htaccess made easy
- WordPress Themes In Depth
- Wizard’s SQL Recipes for WordPress
也可以透過購買以下付費 WordPress 外掛支持外掛開發:
- BBQ Pro – Blazing fast WordPress firewall
- Blackhole Pro:自動封鎖惡意漫遊器
- Banhammer Pro:監控網路流量及封鎖惡意存取
- GA Google Analytics Pro:將 WordPress 網站連接至 Google Analytics
- Head Meta Pro:沒有限制的 WordPress 中繼標記外掛
- Simple Ajax Chat Pro:沒有限制的聊天室
- USP Pro:沒有限制的網站前端功能表單
十分歡迎外部連結、轉推及按讚,謝謝大家 🙂