Skip to content

Commit c153e81

Browse files
committed
Fix #67
1 parent 5c5c99c commit c153e81

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

_posts/2015-03-17-locals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Another scenario for locals:
3333

3434
```java
3535
// filter that injects 'contacts' in locals and implicit in all templates
36-
ALL("/contact.*", routeContext -> routeContext.setLocal("contacts", contactService.getContacts()));
36+
ANY("/contact.*", routeContext -> routeContext.setLocal("contacts", contactService.getContacts()));
3737

3838
// just consume 'contacts' in template
3939
GET("/contacts", routeContext -> routeContext.render("crud/contacts"));

_posts/2015-03-17-security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ Pippo includes a simple CSRF handler which will automatically generate a CSRF to
9292

9393
Using this handler is straight-forward.
9494

95-
**1.** Add an `ALL` filter for the protected path expression with the `CSRFHandler`.
95+
**1.** Add an `ANY` filter for the protected path expression with the `CSRFHandler`.
9696

9797
```java
9898
// add a CSRF token generator and validator
99-
ALL("/books.*", new CSRFHandler());
99+
ANY("/books.*", new CSRFHandler());
100100
```
101101

102102
**2.** Add a `_csrf_token` / `${csrfToken}` hidden input value on all forms that are POSTed to this protected path expression

_posts/2015-06-18-filters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For example we can create an `AuditFilter` (a __before filter__) with this code:
1212

1313
```java
1414
// audit filter
15-
ALL("/.*", routeContext -> {
15+
ANY("/.*", routeContext -> {
1616
log.info("Request for {} '{}'", routeContext.getRequestMethod(), routeContext.getRequestUri());
1717
routeContext.next();
1818
});
@@ -44,7 +44,7 @@ throughout a request-response cycle:
4444

4545
```java
4646
// before filter that create a database instance
47-
ALL("/.*", routeContext -> {
47+
ANY("/.*", routeContext -> {
4848
routeContext.setLocal("database", getDatabase());
4949
routeContext.next();
5050
});
@@ -56,7 +56,7 @@ POST("/{id}", routeContext -> {
5656
});
5757

5858
// after filter that release the database instance
59-
ALL("/.*", routeContext -> {
59+
ANY("/.*", routeContext -> {
6060
Database database = routeContextremoveLocal("database");
6161
database.release();
6262
}).runAsFinally();

0 commit comments

Comments
 (0)