safehttp

package
v0.0.92 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(blockLoopback, blockPrivateIP, blockLinkLocal bool) *http.Client

NewClient returns an HTTP client that can block selected local address ranges.

func NewClientWithAllowList added in v0.0.89

func NewClientWithAllowList(blockLoopback, blockPrivateIP, blockLinkLocal bool, allowList []string) *http.Client

NewClientWithAllowList returns an HTTP client that can block selected local address ranges, except for matching hosts in the allow list.

func NewClientWithAllowListAndTimeout added in v0.0.89

func NewClientWithAllowListAndTimeout(blockLoopback, blockPrivateIP, blockLinkLocal bool, allowList []string, timeout time.Duration) *http.Client

NewClientWithAllowListAndTimeout returns an HTTP client that can block selected local address ranges with a custom timeout, except for matching hosts in the allow list.

func NewClientWithTimeout

func NewClientWithTimeout(blockLoopback, blockPrivateIP, blockLinkLocal bool, timeout time.Duration) *http.Client

NewClientWithTimeout returns an HTTP client that can block selected local address ranges with a custom timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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