[WordPress] 外掛分享: Proxy Real IP

首頁外掛目錄 › Proxy Real IP
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
300+
安裝啟用
★★★★★
5/5 分(5 則評價)
4830 天前
最後更新
問題解決
WordPress 3.0.1+ v1.1 上架:2012-09-24

內容簡介

如果您在代理伺服器後面運行 WordPress,使用者瀏覽您的網站時顯示的 IP 位址可能不是其真實 IP 位址,而是顯示代理伺服器的 IP 位址。Proxy Real IP 可以透過檢查代理傳送的 HTTP 標頭來修正此問題。

Proxy Real IP 會檢查以下 HTTP 標頭:
X-FORWARDED-FOR, X-FORWARDED, FORWARDED-FOR, FORWARDED, X-REAL-IP

Proxy Real IP 會將使用者的 IP 位址設定為第一個符合簡單 IP 位址(123.123.123.123)規則的 HTTP 標頭。

當運行在代理伺服器後面時,Proxy Real IP 也會正確地設定 $_SERVER['HTTPS'] 變數,以讓 WordPress 可以決定代理伺服器連線是否透過 HTTPS。它會查看 HTTP_X_FORWARDED_PROTO PHP 伺服器變數來判斷這一點。

外掛標籤

開發者團隊

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

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

原文外掛簡介

If you’re running WordPress behind a proxy, chances are that the IP address of the user browsing your site won’t show up, instead WordPress will see the IP address of your proxy server. Proxy Real IP sets this straight by looking at the HTTP headers that the proxy sends.
Proxy Real IP looks in the following HTTP headers:
X-FORWARDED-FOR, X-FORWARDED, FORWARDED-FOR, FORWARDED, X-REAL-IP
Proxy Real IP sets the user’s IP address to the first HTTP header defined that matches a simple regular expression of an IP address (123.123.123.123).
Proxy Real IP also sets the $_SERVER[‘HTTPS’] variable correctly when running behind a proxy so that WordPress can determine whether or not the proxy connection is over HTTPS. It looks to the HTTP_X_FORWARDED_PROTO PHP server variable to determine this.

文章
Filter
Mastodon