modified middleware to exclude domain name check from admin pages