middleware

package
v0.0.0-...-0e9cc7d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCORSOptions = CORSOptions{
	AllowedOrigins: []string{"*"},
	AllowedMethods: []string{"*"},
	AllowedHeaders: []string{"*"},
	MaxAge:         86400,
}

Functions

func CORS

func CORS(opts CORSOptions) func(next http.Handler) http.Handler

func ProxyLogging

func ProxyLogging(source string, target string, logResult bool) func(next http.Handler) http.Handler

Types

type CORSOptions

type CORSOptions struct {
	AllowedOrigins []string
	AllowedMethods []string
	AllowedHeaders []string
	MaxAge         int
}

Jump to

Keyboard shortcuts

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