[WordPress] 外掛分享: Remove XML-RPC Methods

首頁外掛目錄 › Remove XML-RPC Methods
WordPress 外掛 Remove XML-RPC Methods 的封面圖片
1,000+
安裝啟用
★★★★★
5/5 分(2 則評價)
107 天前
最後更新
問題解決
WordPress 4.6+ PHP 5.4.0+ v1.4.1 上架:2020-02-09

內容簡介

這款外掛會刪除 WordPress XML-RPC API 的所有方法。這是一個替代方法,可以避免只使用 xmlrpc_enabled 鉤子,因為該鉤子僅用於「禁用需要身份驗證的 XML-RPC 方法」。

啟用此外掛會禁用 Pingbacks 和 Trackbacks,因為這些依賴於 XML-RPC。

測試外掛

您可以使用 cURL 命令列測試外掛是否正常運作:

curl -d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName><params><param><value><string/></value></param></params></methodCall>' https://<你的網域>/xmlrpc.php

這應該只返回 system 方法。

如果該請求返回以 wp. 為開頭的方法,則該外掛未啟用。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Remove XML-RPC Methods」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin does more than just using the xmlrpc_enabled hook, because that is only used “To disable XML-RPC methods that require authentication”.
Activating this plugin will also disable pingbacks, trackbacks, and Really Simple Discovery (RSD), because these rely on XML-RPC.
It works with any webserver, because it does not use the .htaccess file.
Testing the plugin
From the command line you can test if the plugin is working correctly using cURL. Replace the example.com link to match your website:
curl -d 'system.listMethods' https://example.com/xmlrpc.php

This should only return the following methods:
– system.multicall
– system.listMethods
– system.getCapabilities

延伸相關外掛

文章
Filter
Apply Filters
Mastodon