Clone this repo:
  1. 1cb7794 Drop unused author field from pubspec (#13) by Nate Bosch · 4 months ago master
  2. cb6ebf2 Merge pull request #12 from dart-lang/new-pedantic-lints by Nate Bosch · 4 months ago
  3. 9d93898 Fix newly enforced package:pedantic lints by Nate Bosch · 4 months ago
  4. 0194798 Prepare for 0.1.0+7 by Kevin Moore · 9 months ago 0.1.0+7
  5. fabc6a9 Add example/example.dart by Kevin Moore · 9 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}');
}