added proxy test, fixed proxy middleware issues