Block specific /path from accepting ingress from the outside

How do I block traffic to a specific endpoint? Using nginx ingress, I only add a snippet like this:

     nginx.ingress.kubernetes.io/configuration-snippet: |
       location ~ ^/(metrics|readiness|healthz) {
         deny all;
         return 404;
       }

How do I do that in istio? Preferably as global setting. I don’t see such an option in Gateway.