diff --git a/CHANGELOG.md b/CHANGELOG.md index e0525ce..e2a9239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.2.1 + +- Add `As pharaoh middleware` section in README. + ## 2.2.0 - Add `CrossOriginEmbedderPolicy unsafe-none`. diff --git a/README.md b/README.md index 78b593a..e4fd986 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,21 @@ var handler = const Pipeline() ```dart import 'package:shelf_helmet/shelf_helmet.dart'; -Handler helmet(Handler handler) { +Handler middleware(Handler handler) { return handler.use( fromShelfMiddleware(helmet()), ); } ``` +### As pharaoh middleware + +```dart +import 'package:shelf_helmet/shelf_helmet.dart'; + +app.use(useShelfMiddleware(helmet())); +``` + By default, Helmet sets the following headers: ```http diff --git a/pubspec.yaml b/pubspec.yaml index 61eed31..406b76a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: shelf_helmet description: A port of the NodeJS helmet package to Dart. Helmet helps you secure your Dart Shelf/Frog apps by setting various HTTP headers. -version: 2.2.0 +version: 2.2.1 homepage: https://jxstxn.de repository: https://github.com/jxstxn1/shelf_helmet issue_tracker: https://github.com/jxstxn1/shelf_helmet/issues