mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-30 14:06:28 +02:00
fix: random exceptions inside logs in middleware (#2608)
closes #2599 special thanks to bitkarrot for figuring that out, it was actually initialized twice, the decorator alone is enough! also was issue for first_install middleware
This commit is contained in:
@@ -214,8 +214,6 @@ def add_ip_block_middleware(app: FastAPI):
|
||||
)
|
||||
return await call_next(request)
|
||||
|
||||
app.middleware("http")(block_allow_ip_middleware)
|
||||
|
||||
|
||||
def add_first_install_middleware(app: FastAPI):
|
||||
@app.middleware("http")
|
||||
@@ -228,5 +226,3 @@ def add_first_install_middleware(app: FastAPI):
|
||||
):
|
||||
return RedirectResponse("/first_install")
|
||||
return await call_next(request)
|
||||
|
||||
app.middleware("http")(first_install_middleware)
|
||||
|
Reference in New Issue
Block a user