limitations

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1024
	MB = 1024 * 1024
)

Units

View Source
const (
	// Request and Response limitations
	MaxURLSize                = 8 * KB
	MaxCookieSize             = 32 * KB
	MaxRequestHeaderSize      = 69 * KB
	MaxResponseHeaderSize     = 69 * KB
	MaxRequestHeaderCount     = 96
	MaxReponseHeaderCount     = 96
	MaxRequestBodyPayloadSize = 8 * KB

	// Surrogate key limitations but actually don't check these
	MaxSurrogateKeySize       = 1 * KB
	MaxSurrogateKeyHeaderSize = 1 * KB

	// VCL limitations
	MaxCustomVCLFileSize = 1 * MB
	MaxVarnishRestarts   = 3
	MaxLogLineSize       = 16 * KB

	// Increasable limitations by contacting Fastly support
	// These are defaults, you can override by configuration
	MaxACLCounts     = 1000
	MaxBackendCounts = 5
)

Consolidate Fastly's limitation checks See https://docs.fastly.com/en/guides/resource-limits#request-and-response-limits

Variables

This section is empty.

Functions

func CheckFastlyRequestLimit

func CheckFastlyRequestLimit(req *http.Request) error

Validate limitation for the request

func CheckFastlyResourceLimit

func CheckFastlyResourceLimit(ctx *context.Context) error

func CheckFastlyResponseLimit

func CheckFastlyResponseLimit(resp *http.Response) error

Validate limitation for the response

func CheckFastlyVCLLimitation

func CheckFastlyVCLLimitation(vcl string) error

func CheckProtectedHeader

func CheckProtectedHeader(name string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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