improved the allow-query localhost check to account for multi line syntax