Skip to main content
Glama

ScanPower MCP Server

Official
by scanpower
middleware.ts1.06 kB
import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; import { Logger } from "./lib/logger"; export function middleware(request: NextRequest) { const startTime = Date.now(); // Log the request (status and duration are approximate in middleware) const logData = { timestamp: new Date().toISOString(), method: request.method, path: request.nextUrl.pathname, statusCode: 0, // Status not available in middleware duration: 0, // Duration captured at middleware entry userAgent: request.headers.get("user-agent") || undefined, ip: request.headers.get("x-forwarded-for") || request.headers.get("x-real-ip") || undefined, }; Logger.logRequest(logData); return NextResponse.next(); } export const config = { matcher: [ /* * Match all request paths except for the ones starting with: * - _next/static (static files) * - _next/image (image optimization files) * - favicon.ico (favicon file) */ "/((?!_next/static|_next/image|favicon.ico).*)", ], };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scanpower/scanmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server