-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Open
Labels
needs-kindIndicates a PR lacks a `kind/foo` label and requires one.Indicates a PR lacks a `kind/foo` label and requires one.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
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:
ingress-nginx/internal/ingress/annotations/customheaders/main.go
Lines 34 to 37 in fd4c8ac
| // Config returns the custom response headers for an Ingress rule | |
| type Config struct { | |
| Headers map[string]string `json:"headers,omitempty"` | |
| } |
ingress-nginx/rootfs/etc/nginx/template/nginx.tmpl
Lines 334 to 336 in fd4c8ac
| {{ range $k, $v := $addHeaders }} | |
| more_set_headers {{ printf "%s: %s" $k $v | quote }}; | |
| {{ end }} |
Can you declare it in the documentation please?
Metadata
Metadata
Assignees
Labels
needs-kindIndicates a PR lacks a `kind/foo` label and requires one.Indicates a PR lacks a `kind/foo` label and requires one.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Type
Projects
Status
No status