The middleware automatically adjusts the SCRIPT_NAME and PATH_INFO environment variables if the route pattern ends with a {path_info} variable (e.g. /api/v0/secrets/{path_info:.*}).
It also relieves Dispatcher of the need to call routematch() and sets a couple environment variables we can use:
Not needed as urgently as it seemed 24 hours ago (in https://github.com/projectatomic/commissaire-http/pull/79), but this is still good to have for any REST endpoints that proxy other services.
The middleware automatically adjusts the
SCRIPT_NAME
andPATH_INFO
environment variables if the route pattern ends with a{path_info}
variable (e.g./api/v0/secrets/{path_info:.*}
).It also relieves
Dispatcher
of the need to callroutematch()
and sets a couple environment variables we can use:wsgiorg.routing_args
: See the WSGI specroutes.route
: Aroutes.Route
instance