Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: blacklist urls on global speed checker (#1989)
Maximilian Kaske96a12abe79c1
diff --git a/apps/web/src/app/(landing)/play/checker/api/route.ts b/apps/web/src/app/(landing)/play/checker/api/route.tsindex 068a28190..07d936e1c 100644--- a/apps/web/src/app/(landing)/play/checker/api/route.ts+++ b/apps/web/src/app/(landing)/play/checker/api/route.ts@@ -189,6 +189,23 @@ export async function POST(request: Request) {);}+ try {+ const blacklistPatterns = (process.env.BLACKLIST_URL ?? "")+ .split(",")+ .map((p) => p.trim())+ .filter(Boolean);++ if (blacklistPatterns.some((pattern) => new RegExp(pattern).test(url))) {+ return createErrorResponse(+ "INVALID_REQUEST",+ "This URL is not allowed",+ 403,+ );+ }+ } catch (error) {+ console.error("Error checking blacklist", error);+ }+// Rate limiting checkconst clientIP = getClientIP(request.headers);