Respond to proxy requests properly (try fix #1212)

Try to fix #1212 by responding to a proxy request with an `Invalid Request` error on the browser end instead of no error and an error on the server logs.
I feel like this should come earlier in the file. We've already done some processing in the path prefix section near the top.  Probably should do this check before that?