Adding a local-only middleware.

Taken from blank-canvas. 

It is generally useful - this middleware rejects non-local connections with a specific response.