ipfilterware
Go HTTP middleware to filter clients by IP.
Rationale
To protect your application open to the internet you might want to allow only verified or well-known IPs. This can be easily done via firewall but sometimes you do not have access to such tools (cloud providers, proxies, serverless, etc). To make this real you can check a connection IP and check it with your config. This library does this.
Features
- Simple API.
- Clean and tested code.
- Thread-safe updates.
- Dependency-free.
- Fetches for popular providers.
Install
Go version 1.17+
go get github.com/cristalhq/ipfilterware
Example
TODO
Documentation
See these docs.