Skip to content

Commit

Permalink
Update starlette docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Oct 28, 2024
1 parent ede921b commit 0d265a8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/starlette.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ AIKIDO_BLOCKING=true

It's recommended to enable this on your staging environment for a considerable amount of time before enabling it on your production environment (e.g. one week).

## Rate limiting and user blocking
If you want to add the rate limiting feature to your app, modify your code like this:
```py
...
from starlette.middleware import Middleware
from aikido_zen.middleware import AikidoStarletteMiddleware

app = Starlette(routes=[
...
], middleware=[
...
# Set User middleware
...
Middleware(AikidoStarletteMiddleware),
...
])
```

## Debug mode

If you need to debug the firewall, you can run your code with the environment variable `AIKIDO_DEBUG` set to `true`:
Expand Down

0 comments on commit 0d265a8

Please sign in to comment.