httpapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httpapi provides the HTTP surface of vellum: health endpoint, the /mcp mount, and later the JSON REST API for the SPA (/api/*).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(version string, opts Options) http.Handler

NewRouter returns the root HTTP handler.

Types

type Options added in v0.1.0

type Options struct {
	// MCPHandler, when set, is mounted at /mcp behind the origin check.
	MCPHandler http.Handler
	// AllowedOrigins are the browser origins allowed to call /mcp.
	// Requests without an Origin header (CLI clients) always pass.
	AllowedOrigins []string
	// Auth, when set, mounts the OAuth endpoints and guards /mcp with
	// bearer verification. Nil = auth disabled, everything open.
	Auth *auth.Provider
	// CORSOrigins get CORS response headers (browser clients).
	CORSOrigins []string
}

Options configure the router.

Jump to

Keyboard shortcuts

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