• Stefy Lanza (nextime / spora )'s avatar
    fix: middleware order, geolocation NameError, packaging, and test correctness · 8cdcee5f
    Stefy Lanza (nextime / spora ) authored
    - Move geolocation.py from repo root into aisbf/ package (correct location)
    - Fix NameError: call geolocation.get_ip_country() with module prefix in APIBlockingMiddleware
    - Fix middleware execution order: register DashboardBlockingMiddleware and
      APIBlockingMiddleware before ProxyHeadersMiddleware so proxy headers are
      decoded first (last added = first executed in Starlette)
    - Fix typo: is_ip_genocidial -> is_ip_genocidal in aisbf/geolocation.py
    - Fix tests: update import path to aisbf.geolocation and use AsyncMock so
      httpx coroutines are properly awaitable
    - Add aisbf/geolocation.py and templates/blocked.html to setup.py data_files
    - Add trailing newlines to geolocation.py, blocked.html, and test file
    - Add static/i18n.js and static/i18n/*.json locale files
    8cdcee5f
blocked.html 934 Bytes