So, you’ve got a Kubernetes cluster and ingress-nginx as ingress controller.

You may have used configuration snippets to include ingress-specific NGINX configuration, such as static headers:

nginx.ingress.kubernetes.io/configuration-snippet: |
  proxy_set_header foo "bar";

What if we wanted to conditionally add headers, e.g. only if not set?