<commit_before>import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_security/native.dart';
import 'package:logging/logging.dart';
import 'package:pretty_logging/pretty_logging.dart';

main() async {
  // Logging boilerplate.
  Logger.root.onRecord.listen(prettyLog);

  // Create an app, and HTTP driver.
  var app = Angel(logger: Logger('rate_limit')), http = AngelHttp(app);

  // Filter out SQL injections from the query. On every GET request,
  // print out the query parameters (as JSON).
  app
    ..fallback(sqliFilterQuery)
    ..get('/', (req, res) => req.queryParameters)
    ..fallback((req, res) => throw AngelHttpException.notFound());

  // Start the server.
  await http.startServer('127.0.0.1', 3000);
  print('SQLi filtering example listening at ${http.uri}');
}<commit_msg>Add example url<commit_after>import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_security/native.dart';
import 'package:logging/logging.dart';
import 'package:pretty_logging/pretty_logging.dart';

main() async {
  // Logging boilerplate.
  Logger.root.onRecord.listen(prettyLog);

  // Create an app, and HTTP driver.
  var app = Angel(logger: Logger('rate_limit')), http = AngelHttp(app);

  // Filter out SQL injections from the query. On every GET request,
  // print out the query parameters (as JSON).
  app
    ..fallback(sqliFilterQuery)
    ..get('/', (req, res) => req.queryParameters)
    ..fallback((req, res) => throw AngelHttpException.notFound());

  // Start the server.
  await http.startServer('127.0.0.1', 3000);
  print('SQLi filtering example listening at ${http.uri}');

  var exampleUri = http.uri.replace(queryParameters: {
    'id': "-1' and 1=1 union/* foo */select load_file('/etc/passwd')--"
  });
  print('Example URI: $exampleUri');
}
{'fraction_non_alphanumeric': 0.15124272871496564, 'fraction_numerical': 0.012162876784769964, 'mean_word_length': 4.405714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3591876', 'n_tokens_mistral': 619, 'n_tokens_neox': 584, 'n_words': 150}