package
Version:
v0.0.3
Opens a new window with list of versions in this module.
Published: Jun 16, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package middleware provides HTTP middleware for the yt-transcript server.
Package middleware provides HTTP middleware for the yt-transcript server.
Package middleware provides HTTP middleware for the yt-transcript server.
CORS sets permissive CORS headers and handles preflight requests.
CSP sets a Content-Security-Policy header on every response.
Logging logs each request with method, path, status, cache, and duration.
ServerHeader sets the Server and X-yt-transcript-Version response headers.
type CacheStatus struct {
Hit bool
Set bool
}
CacheStatus tracks whether a request was a cache hit or miss.
CtxKey is the context key for cache status in request context.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.