mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2025-11-05 13:26:08 +00:00
implemented "SUPPORT_MALFORMED_JSON" variable
This commit is contained in:
@@ -96,6 +96,11 @@ app.add_middleware(
|
||||
allow_methods=['*'],
|
||||
allow_headers=['*'],
|
||||
)
|
||||
if bool(env('SUPPORT_MALFORMED_JSON', False)):
|
||||
from middleware import PatchMalformedJsonMiddleware
|
||||
|
||||
logger.info(f'Enabled "PatchMalformedJsonMiddleware"!')
|
||||
app.add_middleware(PatchMalformedJsonMiddleware, enabled=True)
|
||||
|
||||
|
||||
# Helper
|
||||
|
||||
Reference in New Issue
Block a user