Skip to content

Commit

Permalink
Add note about middleware and fallback handler
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Aug 5, 2023
1 parent ea17634 commit e823c96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ If no routes match a request path, you can specify another instance of `RequestH
public function setFallback(RequestHandler $requestHandler): void
```

> **Note**
> Middleware defined by `Router::stackMiddleware()` will _not_ be invoked when a request is forwarded to fallback handler. Use `Amp\Http\Server\Middleware\stackMiddleware()` to wrap the fallback request handler with any middlewares needed first.
## Example

```php
Expand Down

0 comments on commit e823c96

Please sign in to comment.