You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-21Lines changed: 0 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -134,27 +134,6 @@ Uses [Flask Limiter](https://flask-limiter.readthedocs.io/en/stable/) to set req
134
134
135
135
Rate limit storage can be backed by [Redis](https://redis.io/) using the `RATELIMIT_STORAGE_URL` config value in `config.py`, or fall back to in-memory if not present. Rate limit information will also be added to various [response headers](https://flask-limiter.readthedocs.io/en/stable/#rate-limiting-headers).
136
136
137
-
## Next steps
138
-
139
-
### Add your own blueprint
140
-
141
-
### Add database functionality
142
-
143
-
### Add user authentication
144
-
145
-
If you're implementing user authentication using [Flask Login](https://flask-login.readthedocs.io/en/latest/) you should also use a `key_func` to identify users on routes that require authentication, for example:
146
-
147
-
```python
148
-
@login_required
149
-
@limiter.limit("2 per second", key_func=lambda: current_user.id)
150
-
```
151
-
152
-
This fixes the issue of rate limiting multiple users behind a single IP NAT or proxy, since the request is identified using a different unique value for each user.
0 commit comments