@agentix-security/nextjs 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -423,7 +423,7 @@ function agentScore(req) {
|
|
|
423
423
|
const ua = (req.headers.get("user-agent") ?? "").toLowerCase();
|
|
424
424
|
if (/bot|crawler|spider|python-requests|curl\/|node-fetch|axios|go-http-client|claude-web|gptbot|chatgpt|google-extended|oai-searchbot|anthropic|llm/i.test(ua)) score += 0.8;
|
|
425
425
|
if (!ua) score += 0.6;
|
|
426
|
-
if (!req.headers.get("sec-fetch-site") && !req.headers.get("sec-ch-ua")) score += 0.
|
|
426
|
+
if (!req.headers.get("sec-fetch-site") && !req.headers.get("sec-ch-ua")) score += 0.5;
|
|
427
427
|
if (!req.headers.get("accept-language")) score += 0.15;
|
|
428
428
|
const accept = req.headers.get("accept") ?? "";
|
|
429
429
|
if (req.method === "GET" && !accept.includes("text/html")) score += 0.2;
|
package/dist/index.js
CHANGED
|
@@ -421,7 +421,7 @@ function agentScore(req) {
|
|
|
421
421
|
const ua = (req.headers.get("user-agent") ?? "").toLowerCase();
|
|
422
422
|
if (/bot|crawler|spider|python-requests|curl\/|node-fetch|axios|go-http-client|claude-web|gptbot|chatgpt|google-extended|oai-searchbot|anthropic|llm/i.test(ua)) score += 0.8;
|
|
423
423
|
if (!ua) score += 0.6;
|
|
424
|
-
if (!req.headers.get("sec-fetch-site") && !req.headers.get("sec-ch-ua")) score += 0.
|
|
424
|
+
if (!req.headers.get("sec-fetch-site") && !req.headers.get("sec-ch-ua")) score += 0.5;
|
|
425
425
|
if (!req.headers.get("accept-language")) score += 0.15;
|
|
426
426
|
const accept = req.headers.get("accept") ?? "";
|
|
427
427
|
if (req.method === "GET" && !accept.includes("text/html")) score += 0.2;
|