Skip to content

Commit

Permalink
Add As pharaoh middleware section
Browse files Browse the repository at this point in the history
  • Loading branch information
jxstxn1 committed Feb 1, 2024
1 parent deef003 commit eddbc65
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.1

- Add `As pharaoh middleware` section in README.

## 2.2.0

- Add `CrossOriginEmbedderPolicy unsafe-none`.
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit eddbc65

Please sign in to comment.