ipblocklist

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ipblocklist provides middleware that rejects requests whose client IP matches a configured blocklist of addresses or CIDR ranges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts Options) express.Handler

New returns middleware that responds with 403 when the request's client IP matches one of the configured blocklist entries, and otherwise calls next.

Types

type Options

type Options struct {
	// Block is a list of denied client IPs or CIDR ranges (e.g.
	// "10.0.0.0/8"). Required.
	Block []string
}

Options configures the IP blocklist middleware.

Jump to

Keyboard shortcuts

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