disablecompression

package
v0.26.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientIPPredicate

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

ClientIPPredicate.Predicate implements CompressionDisabledFunc interface that decides based on client IP.

func NewClientIPPredicate

func NewClientIPPredicate(cidrStrings []string) (*ClientIPPredicate, error)

NewClientIPPredicate creates a new ClientIPPredicate instance.

func (*ClientIPPredicate) Predicate

func (c *ClientIPPredicate) Predicate(req *http.Request) (bool, error)

Predicate checks if ClientIP matches any cidr.

Jump to

Keyboard shortcuts

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