Stack middleware for allowing application access for specific IPs