req.connection.remoteAddress will have the IP address of the system making the request; you can do a reverse DNS lookup on it and match against the returned domains. If you're using express or connect you can write a middleware function to do this.