Skip to content

Custom headers annotation feature doesn't allowed headers with multiple value

Hello

I want to replace the following configuration-snippet annotation:

annotations:
...
    nginx.ingress.kubernetes.io/configuration-snippet: |
      add_header X-Robots-Tag "noindex";
      add_header X-Robots-Tag "noai";
      add_header X-Robots-Tag "Google-Extended: none";
      add_header X-Robots-Tag "GPTBot: none";
      add_header X-Robots-Tag "ChatGPT-User: none";
      add_header X-Robots-Tag "anthropic-ai: none";
      add_header X-Robots-Tag "CCBot: none";

with an usage of the Custom Headers annotation, but the implementation doesn't support this repeated headers setting, as the source code reveals: https://github.com/kubernetes/ingress-nginx/blob/fd4c8acc0c2589a059b748e04ae972923da29c9d/internal/ingress/annotations/customheaders/main.go#L34-L37 https://github.com/kubernetes/ingress-nginx/blob/fd4c8acc0c2589a059b748e04ae972923da29c9d/rootfs/etc/nginx/template/nginx.tmpl#L334-L336

Can you declare it in the documentation please?