Fixes#1820.
Correct error handling in response to CORS.
Changes proposed in this pull request:
- Add a MiddlewarePosition before Exception handling so CORS is always
returned
- Add ServerError Middleware to handle unhandled errors between the
ServerError- and ExceptionMiddleware
- Update corresponding docs
---------
Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>
As discussed in #1807.
Allowing the injection of WSGI middleware can enable easier migration
from Connexion 2 to Connexion 3. The use cases are limited though, as
this will only work for middleware that can work at the end of the
middleware stack.
I'm starting to use the project with the newly release 3 version.
70084bcc4c/docs/middleware.rst (L115-L120)
It seems this example is not correct.
1. missing import for SecurityMiddleware
2. `ConnexionMiddleware.default_middlewares` is a list of classes, not
class instances: the filtering never happen.