Ensure api middleware loads before the status code ones.