zeratax / matrix-registration

a token based matrix registration api
https://zeratax.github.io/matrix-registration/
MIT License
227 stars 41 forks source link

Update Flask-Limiter usage #83

Closed SapuSeven closed 2 years ago

SapuSeven commented 2 years ago

v2.0.1 removes the deprecated get_ipaddr method. get_ip_from_header get_remote_address has to be used instead or the service fails to start with the following error message:

Traceback (most recent call last):
  File "/usr/local/bin/matrix-registration", line 5, in <module>
    from matrix_registration.app import cli
  File "/usr/local/lib/python3.8/site-packages/matrix_registration/app.py", line 9, in <module>
    from flask_limiter.util import get_ipaddr
ImportError: cannot import name 'get_ipaddr' from 'flask_limiter.util' (/usr/local/lib/python3.8/site-packages/flask_limiter/util.py)
xelantro commented 2 years ago

I fixed this in #86 while changing which ips are looked at to rate limit (to accout for reverse proxies) But thanks for making us aware!