middleware

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPWhitelist added in v0.1.13

func IPWhitelist(host string, allowedIPs []string) gin.HandlerFunc

IPWhitelist returns middleware that rejects requests from IPs not in the allowed list. If host is 127.0.0.1 or localhost, all checks are skipped.

func LocalhostOnly

func LocalhostOnly() gin.HandlerFunc

LocalhostOnly returns middleware that restricts access to loopback addresses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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