mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 01:43:42 +01: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:
parent
ffba71c0ce
commit
b0a66e8cf5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user