Scanner and rotator accept bare domains (scheme added for them); clearer scanner error
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ function init(opts) { DATA_DIR = opts.dataDir; geo = opts.geo || null; OWN_HOSTS
|
||||
const norm = e => String(e || '').trim().toLowerCase();
|
||||
const newCode = () => { const a = 'abcdefghjkmnpqrstuvwxyz23456789'; let s = ''; for (let i = 0; i < 6; i++) s += a[crypto.randomInt(a.length)]; return s; };
|
||||
const BOT = /bot|crawl|spider|slurp|facebookexternalhit|preview|telegrambot|whatsapp|curl|wget|python-requests|headless/i;
|
||||
const cleanUrl = u => { const s = String(u || '').trim(); return /^https?:\/\/[^\s]+$/i.test(s) && s.length <= 500 ? s : null; };
|
||||
const cleanUrl = u => { let s = String(u || '').trim(); if (s && !/^[a-z][a-z0-9+.-]*:\/\//i.test(s) && /^[^\s\/]+\.[^\s]+/.test(s)) s = 'https://' + s; return /^https?:\/\/[^\s]+$/i.test(s) && s.length <= 500 ? s : null; };
|
||||
|
||||
function pub(r) {
|
||||
const hits = J.db.hits.filter(h => h.r === r.id);
|
||||
|
||||
Reference in New Issue
Block a user