fixed ip-check for proxy-requests, added tests