[WordPress] 外掛分享: Turn Off REST API

首頁外掛目錄 › Turn Off REST API
100+
安裝啟用
尚無評分
18 天前
最後更新
問題解決
WordPress 4.7+ PHP 7.4+ v1.1.1 上架:2017-03-22

內容簡介

Turn Off REST API 是一款輕量級的 WordPress 安全外掛,旨在為未登入的訪客禁用 WordPress REST API。這樣可以防止匿名請求獲取網站數據,增強安全性,同時保持已登入用戶及外掛正常運作。

【主要功能】
• 禁止未登入用戶訪問 REST API
• 返回身份驗證錯誤以保護數據
• 可選擇性移除 REST API 發現鏈接
• 建立公開路由的允許清單
• 提供網站健康檢查功能

外掛標籤

開發者團隊

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

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

原文外掛簡介

Turn Off REST API is a lightweight WordPress security plugin that disables the WordPress REST API for visitors who are not logged in. Anonymous requests to your /wp-json endpoints receive an authentication error instead of your site data, while logged in users, your theme, and your plugins keep working normally.
By default WordPress exposes a large amount of information through the REST API, including your list of user accounts and usernames, published content, and details about your site. For most sites that open, unauthenticated access is unnecessary and only widens the attack surface for user enumeration and content scraping. Turn Off REST API closes the WordPress REST API to the public in one click, then gives you a clear settings screen to reopen only the specific REST API routes you actually need.
Why turn off the WordPress REST API?

Stop anonymous user enumeration through /wp-json/wp/v2/users.
Reduce your attack surface against REST API based exploits and bots.
Keep your content and site data from being scraped through the public API.
Stay in control with a per route allow list instead of an all or nothing switch.

What it does

Returns an authentication error for unauthenticated REST API requests.
Optionally removes the REST API discovery links and headers from your page source.
Lets you build an allow list of routes that should stay public (for example a contact form or a specific integration).
Adds a Site Health check so the restriction is clearly explained and never mistaken for a fault.
Keeps the admin area, the block editor, and logged in functionality fully working.

Built for control, not breakage
Some security plugins disable the REST API completely and break the block editor or third party integrations in the process. Turn Off REST API only blocks unauthenticated access, and the per route allow list means you can whitelist exactly the endpoints a service needs without opening the whole API back up.
Developer friendly
The access decision runs through the tora_grant_rest_api filter, so developers can extend or override the logic for custom roles, application passwords, or trusted requests.

延伸相關外掛

文章
Filter
Mastodon