projectatomic / commissaire-http

Commissaire HTTP server
GNU General Public License v3.0
3 stars 7 forks source link

Use RoutesMiddleware #82

Closed mbarnes closed 7 years ago

mbarnes commented 7 years ago

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 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:

mbarnes commented 7 years ago

(3) [multi-host-mgr-2] Proxy Custodia's REST API