Skip to main content
Glama
rog0x
by rog0x

header_analyzer

Analyze HTTP response headers to identify security configurations, caching directives, CORS settings, and server details while providing a security assessment grade.

Instructions

Analyze HTTP response headers for security (HSTS, CSP, X-Frame-Options, etc.), caching directives, CORS configuration, cookies, and server information. Provides a security grade.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headersNoHTTP response headers as key-value pairs to analyze
urlNoAlternatively, provide a URL to fetch and analyze its response headers

Implementation Reference

  • The analyzeHeaders function processes the raw headers input and orchestrates the analysis of security, caching, CORS, and cookies.
    export function analyzeHeaders(
      headers: Record<string, string>
    ): HeaderAnalysis {
      if (!headers || Object.keys(headers).length === 0) {
        throw new Error("Provide a non-empty headers object to analyze");
      }
    
      return {
        raw_headers: headers,
        security: analyzeSecurityHeaders(headers),
        caching: analyzeCaching(headers),
        cors: analyzeCors(headers),
        cookies: analyzeCookies(headers),
        server_info: {
          server: get(headers, "server"),
          powered_by: get(headers, "x-powered-by"),
        },
      };
    }
  • Type definition for the output of the header_analyzer tool.
    export interface HeaderAnalysis {
      raw_headers: Record<string, string>;
      security: SecurityAnalysis;
      caching: CachingAnalysis;
      cors: CorsAnalysis;
      cookies: CookieAnalysis[];
      server_info: {
        server: string | null;
        powered_by: string | null;
      };
    }

Latest Blog Posts

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/rog0x/mcp-api-tools'

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