jaguar_ban_ip 0.1.0 copy "jaguar_ban_ip: ^0.1.0" to clipboard
jaguar_ban_ip: ^0.1.0 copied to clipboard

outdatedDart 1 only

Interceptors and functions to filter requests based on IP addresses

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.

0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Interceptors and functions to filter requests based on IP addresses

Homepage

License

BSD-3-Clause (LICENSE)

Dependencies

jaguar, jaguar_ipnet

More

Packages that depend on jaguar_ban_ip