context: fix request middleware