corshttp

package
v1.142.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package corshttp is the CORS layer of the platform's listener: the headers a browser-based MCP client needs, the preflight answer, and the one path family that bypasses it, the webhook receiver (#1870). Its own package so internal/httpserver, at its size budget, holds the assembly alone.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(next http.Handler) http.Handler

Middleware adds CORS headers for browser-based MCP clients.

func WithoutHooks

func WithoutHooks(receiver, rest http.Handler) http.Handler

WithoutHooks routes the webhook receiver around cors. A webhook is posted by a server, never a browser, and the receiver answers OPTIONS itself: the CloudEvents handshake is an OPTIONS request, and a source without it must refuse one rather than have it answered 200 here (#1870).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL