mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
add locale override capabilities
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user