platform/README.md

27 lines
847 B
Markdown
Raw Normal View History

2016-11-10 04:28:11 +00:00
# angel_proxy
2016-11-23 22:03:06 +00:00
2017-04-22 18:46:00 +00:00
[![version 1.0.3](https://img.shields.io/badge/version-1.0.3-brightgreen.svg)](https://pub.dartlang.org/packages/angel_proxy)
2017-04-02 02:06:27 +00:00
[![build status](https://travis-ci.org/angel-dart/proxy.svg)](https://travis-ci.org/angel-dart/proxy)
2016-11-23 22:03:06 +00:00
Angel middleware to forward requests to another server (i.e. pub serve).
```dart
import 'package:angel_proxy/angel_proxy.dart';
main() async {
// ...
// Forward requests instead of serving statically
await app.configure(new ProxyLayer('localhost', 3000));
// Or, use one for pub serve.
//
// This automatically deactivates itself if the app is
// in production.
await app.configure(new PubServeLayer());
}
2017-04-02 02:06:27 +00:00
```
If your app's `storeOriginalBuffer` is `true`, then request bodies will be forwarded
2017-04-10 02:15:45 +00:00
as well, if they are not empty. This allows things like POST requests to function.