feat: add GeoIP status API route and improved geoblock UI

This commit is contained in:
fuomag9
2026-02-25 01:22:04 +01:00
parent 18c890bb21
commit ccef82cca8
3 changed files with 156 additions and 39 deletions

View File

@@ -0,0 +1,12 @@
import { existsSync } from "node:fs";
import { NextResponse } from "next/server";
const COUNTRY_DB = "/usr/share/GeoIP/GeoLite2-Country.mmdb";
const ASN_DB = "/usr/share/GeoIP/GeoLite2-ASN.mmdb";
export async function GET() {
return NextResponse.json({
country: existsSync(COUNTRY_DB),
asn: existsSync(ASN_DB),
});
}