CaseInsensitiveFormMiddleware¶
- class safir.middleware.ivoa.CaseInsensitiveFormMiddleware(app)¶
Bases:
object
Make POST parameter keys all lowercase.
This middleware attempts to work around case-sensitivity issues by lowercasing POST parameter keys before the request is processed. This allows normal FastAPI parsing to work without regard for case, permitting FastAPI to perform input validation on the POST parameters.
- Parameters:
app (
Callable
[[MutableMapping
[str
,Any
],Callable
[[],Awaitable
[MutableMapping
[str
,Any
]]],Callable
[[MutableMapping
[str
,Any
]],Awaitable
[None
]]],Awaitable
[None
]])
Methods Summary
__call__
(scope, receive, send)Process request set query parameters and POST body keys to lowercase.
Methods Documentation