netguard

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package netguard keeps aimux's local HTTP endpoints reachable only from this machine: no DNS rebinding and no requests from other web sites.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLoopbackHost

func IsLoopbackHost(hostport string) bool

IsLoopbackHost reports whether a Host header value (host or host:port) names this machine: localhost or a loopback IP.

func IsLoopbackOrigin

func IsLoopbackOrigin(origin string) bool

IsLoopbackOrigin reports whether an Origin header is an http(s) origin on a loopback host. An empty Origin is not a loopback origin.

func LocalOnly

func LocalOnly(next http.Handler) http.Handler

LocalOnly rejects requests whose Host is not loopback, or that a browser sent from a page that is not itself on a loopback origin.

Types

This section is empty.

Jump to

Keyboard shortcuts

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