外掛說明
啟用 Cloudflare Access 自主託管應用程式以保護網站的 /wp-admin
資料夾。請將從 Cloudflare Access 取得的 [驗證網域] 及 [應用程式對象 (AUD) 標記] 設定至外掛中,電子郵件地址相符且通過驗證的使用者便會自動登入 WordPress 網站。
請依照 Cloudflare 官方文件設定 Cloudflare Access。
網站管理員也可以將以下常數加入 wp-config.php
檔案中。
define('WP_CF_ACCESS_AUTH_DOMAIN', 'yourdomain.cloudflareaccess.com');
define('WP_CF_ACCESS_JWT_AUD', 'examplef2nat0rkar2866wn829a0x2ztdg');
define('WP_CF_ACCESS_REDIRECT_LOGIN', true);
這個網站與 Cloudflare 無關,也不是由 Cloudflare 開發。所有商標、服務標誌及公司名稱均屬關係人所有。
螢幕擷圖
常見問題集
-
如何將 WordPress 登入頁面 /wp-login.php 重新導向至 Cloudflare Access?
-
啟用 [重新導向登入頁面] 後,之後的登入都會重新導向至
/wp-admin
並觸發 Cloudflare Access 驗證。 -
啟用重新導向登入頁面設定後,產生無限重新導向迴圈問題。
-
這個功能假設
/wp-admin
受到 Cloudflare Access 的保護。如果這個資料夾未受保護,自動登入功能會失效並重新導向回登入頁面,這便會造成重新導向迴圈。
使用者評論
2024 年 2 月 9 日
Love the idea – I have Warp enabled and getting redirect loops, even though wp-admin* and wp-login.php* are both listed as application urls. Any idea why this is happening? Would this work with Warp enabeled?
2022 年 1 月 31 日
Clean, simple, and precisely what it promises.
I just configured my complete setup using Cloudflare Access with auth via AzureAD and auto-login to wp-admin. This plugin is gold!
Combined with the Authenticated Origin Pulls feature of CF, this is seamlessly intertwined enterprise-level security for free.
2021 年 7 月 31 日
I am testing this plugin, I think Jetpack’s secure login feature can be replaced with this plugin, this means I can remove Jetpack after my testing is done.
Good job, thank you so much.
2021 年 3 月 20 日
1 則留言
I was close in developing this from scratch. and I was surprised this plugin is already developed. Please keep it up.
參與者及開發者
變更記錄
1.1.4
- Fix redirect issue for non-default wp-admin urls
1.1.3
- Tested with WordPress 6.1.1
1.1.2
- Tested with WordPress 5.9
- Fixed errors when activated in multi-site enabled installation
1.1.1
- Show an error message when user does not exist to prevent redirect loop
1.0.0
- Tested with WordPress 5.8
- Update php-jwt to 5.4
- Stable. No major change planned
0.9.3
- Tested with WordPress 5.7
0.9.2
- update minimum requirements
- update php-jwt to 5.2.1
0.9.0
- First beta release.