Skip to main content
Glama

Google Maps MCP Server

by iceener
cors.ts735 B
// CORS middleware for Hono - uses built-in cors() helper import { cors } from 'hono/cors'; /** * CORS middleware configured for MCP endpoints. * Uses Hono's built-in cors() middleware. * * Note: Preflight returns 204 (Hono default) vs original 200. * Both are valid per CORS spec - browsers accept either. */ export const corsMiddleware = () => cors({ origin: (origin) => origin || 'http://localhost', allowMethods: ['GET', 'POST', 'DELETE', 'OPTIONS'], allowHeaders: [ 'Content-Type', 'Authorization', 'Mcp-Session-Id', 'MCP-Protocol-Version', 'Mcp-Protocol-Version', 'X-Api-Key', 'X-Auth-Token', ], exposeHeaders: ['Mcp-Session-Id', 'WWW-Authenticate'], });

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/iceener/maps-streamable-mcp-server'

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