middleware

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package middleware provides HTTP middleware for the MCP Kubernetes server. These middleware functions handle security headers, CORS, and other cross-cutting concerns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(allowedOrigins []string) func(http.Handler) http.Handler

CORS adds CORS headers for OAuth endpoints with validated origins

func SecurityHeaders

func SecurityHeaders(hstsEnabled bool) func(http.Handler) http.Handler

SecurityHeaders adds comprehensive security headers to all HTTP responses

func ValidateAllowedOrigins

func ValidateAllowedOrigins(originsEnv string) ([]string, error)

ValidateAllowedOrigins validates and normalizes allowed CORS origins

Types

This section is empty.

Jump to

Keyboard shortcuts

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