Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api.main: add middleware for HTTP requests
Instead of returning HTTP 404 error when request URL has no version number prefix, redirect the request with '/latest' version. e.g. when user tries to access `http://localhost:8001`, redirect it to `http://localhost:8001/latest`. The middleware will check the version from the request path with available API versions using `API_VERSIONS` list. The list will be initialized on app startup event with `init_api_versions` handler. Signed-off-by: Jeny Sadadia <[email protected]>
- Loading branch information