mcp-use TypeScript API
    Preparing search index...

    Function originValidationMiddleware

    • Reject requests whose Origin header is not on the allowlist.

      Parameters

      • origins: string[]

        Allowed origin hostnames (port-agnostic).

      • skipSafeMethods: boolean = true

        When true, skip GET/HEAD (view asset GETs).

      Returns FetchMiddleware