Signup Gate
註冊表單加上一個 script 標籤,伺服器上做一次核驗。機械人、一次性電郵、無效網域以及經 Tor 或 VPN 的註冊均會被識別;gmial.com 之類的拼寫錯誤會獲得修正建議。
建立帳戶
Safari 18 · iPhone電郵
密碼
帳戶已建立
檢查項目
網絡及瀏覽器資料隨 token 而來;電郵隨您伺服器的 verify 呼叫而來。
Tor、VPN、住宅代理及數據中心地址,按類別標示。
代機械人填寫表單的無頭瀏覽器及程式。
語法錯誤、不接收郵件的網域、一次性電郵、拼寫錯誤及職能電郵。
運作方式
與任何表單所用的表單 Gate 相同,只是在核驗中加上電郵地址。
gate.js 標籤在註冊頁面加入一個 script 標籤,填上您的網站金鑰。
<script
src="https://ipscanner.io/gate.js"
data-sitekey="site_4fQ8nZ2kLm7xR1vT9cBw"
async></script>gate.js 會加入隱藏欄位 ipscanner-token。不使用 Cookie,亦不使用瀏覽器儲存。
<form method="post" action="/signup">
<input name="email" type="email">
<input name="password" type="password">
<!-- added by gate.js -->
<input type="hidden"
name="ipscanner-token"
value="c2l0ZV80ZlE4fDE3…">
</form>您的伺服器把 token 及電郵傳送至 /v1/gate/verify,取得一個結果。
{
"success": true,
"class": "human",
"action": "flag",
"mode": "enforce",
"email": {
"status": "risky",
"reason": "typo",
"suggestion": "jane@gmail.com",
"domain": "gmial.com",
"action": "flag"
}
}一次性電郵及無效地址預設攔截;拼寫錯誤會被標記,方便您提示修正。
核驗程式碼
隨 token 一併傳送 email。在 enforce 模式下 action 為 block 時拒絕註冊;有 email.suggestion 時向用戶顯示。
// token = the form's "ipscanner-token" field, ip = the visitor's address
// email = the address the form submitted
const res = await fetch('https://ipscanner.io/v1/gate/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ secret: process.env.IPSCANNER_GATE_SECRET, token, remote_ip: ip, email })
});
const v = await res.json();
if (!v.success || (v.action === 'block' && v.mode === 'enforce')) {
// reject the signup; v.email.suggestion holds "did you mean" when there is one
}先監察,後攔截
Monitor 模式下不會拒絕任何請求。Sites 控制台顯示每次註冊的類別、電郵結果以及原應發生的處理。
常見問題
建立開啟註冊電郵檢查的 Gate,貼上一個 script 標籤,加入核驗程式碼。Free 以 Monitor 模式運行;Starter 可攔截,HK$148/月起。