mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-14 10:51:31 +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:
parent
ffba71c0ce
commit
b0a66e8cf5
@ -214,8 +214,6 @@ def add_ip_block_middleware(app: FastAPI):
|
|||||||
)
|
)
|
||||||
return await call_next(request)
|
return await call_next(request)
|
||||||
|
|
||||||
app.middleware("http")(block_allow_ip_middleware)
|
|
||||||
|
|
||||||
|
|
||||||
def add_first_install_middleware(app: FastAPI):
|
def add_first_install_middleware(app: FastAPI):
|
||||||
@app.middleware("http")
|
@app.middleware("http")
|
||||||
@ -228,5 +226,3 @@ def add_first_install_middleware(app: FastAPI):
|
|||||||
):
|
):
|
||||||
return RedirectResponse("/first_install")
|
return RedirectResponse("/first_install")
|
||||||
return await call_next(request)
|
return await call_next(request)
|
||||||
|
|
||||||
app.middleware("http")(first_install_middleware)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user