headers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter handles header filtering based on configuration

func NewFilter

func NewFilter(config config.HeaderForwardingConfig) *Filter

NewFilter creates a new header filter with the given configuration

func (*Filter) FilterHeaders

func (f *Filter) FilterHeaders(headers map[string]string) map[string]string

FilterHeaders filters a map of headers, returning only those that should be forwarded

func (*Filter) GetAllowedHeaders

func (f *Filter) GetAllowedHeaders() []string

GetAllowedHeaders returns the list of allowed headers

func (*Filter) GetBlockedHeaders

func (f *Filter) GetBlockedHeaders() []string

GetBlockedHeaders returns the list of blocked headers

func (*Filter) IsEnabled

func (f *Filter) IsEnabled() bool

IsEnabled returns whether header forwarding is enabled

func (*Filter) ShouldForward

func (f *Filter) ShouldForward(headerName string) bool

ShouldForward determines if a header should be forwarded based on configuration

Jump to

Keyboard shortcuts

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