add locale override capabilities

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-02-09 09:27:04 -05:00
parent a34d331967
commit d01fefdb30
9 changed files with 37 additions and 12 deletions
+2
View File
@@ -71,6 +71,8 @@ def setup_middleware(app: FastAPI, cmd_opts):
}
if err['code'] == 401 and 'file=' in req.url.path: # dont spam with unauth
return JSONResponse(status_code=err['code'], content=jsonable_encoder(err))
if err['code'] == 404 and 'file=html/' in req.url.path: # dont spam with locales
return JSONResponse(status_code=err['code'], content=jsonable_encoder(err))
log.error(f"API error: {req.method}: {req.url} {err}")