Skip to content

Jaguar interceptors to ban requests from range/specified IPs

License

Notifications You must be signed in to change notification settings

Jaguar-dart/jaguar_ban_ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jaguar_ban_ip

Interceptors and functions to filter requests based on IP addresses

Usage

A simple usage example:

import 'package:jaguar/jaguar.dart';
import 'package:jaguar_reflect/jaguar_reflect.dart';
import 'package:jaguar_ban_ip/jaguar_ban_ip.dart';

@Api(path: '/api')
class ExampleApi {
  @Get(path: '/info')
  @WrapIPFilter(const IPFilterOptions(const ['127.0.0.0/8'])) //Blocks loopback IPs
  String info() => "A very secret message!";
}

main() async {
  Jaguar server = new Jaguar();
  server.addApi(reflectJaguar(new ExampleApi()));
  await server.serve();
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

About

Jaguar interceptors to ban requests from range/specified IPs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages