Skip to content

Commit

Permalink
Update flask docs to add ratelimiting checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Oct 28, 2024
1 parent fd21bcd commit 21b8353
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ 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 aikido_zen.middleware import AikidoFlaskMiddleware

app = Flask(__name__)
# ...
app.wsgi_app = AikidoFlaskMiddleware(app.wsgi_app)
# ...
# set user in middleware
# ...
```

## 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 21b8353

Please sign in to comment.