Clone this repo:
  1. b118f76 Update LICENSE by Franklin Yow · 3 months ago master
  2. 06fde34 Update LICENSE by Franklin Yow · 3 months ago
  3. ccd311f enable null safety (#23) by Kevin Moore · 3 months ago v1.0.0
  4. 8dee6ed Migrate to GitHub Actions (#21) by Alexander Thomas · 5 months ago
  5. 3ecd4f8 Delete .test_config by Kevin Moore · 11 months ago

Proxy for Shelf

Build Status

shelf_proxy is a Shelf handler that proxies requests to an external server. It can be served directly and used as a proxy server, or it can be mounted within a larger application to proxy only certain URLs.

import 'package:shelf/shelf_io.dart' as shelf_io;
import 'package:shelf_proxy/shelf_proxy.dart';

void main() async {
  var server = await shelf_io.serve(
    proxyHandler("https://dart.dev"),
    'localhost',
    8080,
  );

  print('Proxying at http://${server.address.host}:${server.port}');
}