-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Description
Description
Bug / Feature Request
In APISIX Ingress Controller version v1.8.4
, annotations related to the proxy-rewrite
plugin are not complete when defined on an Ingress resource.
Environment
- APISIX Ingress Controller version:
v1.8.4
- Kubernetes version:
v1.28.x
- Installation method: Helm
- Mode: Ingress resource (not ApisixRoute)
Expected Behavior
When defining the following annotations on a standard Ingress
, I expect them to configure the proxy-rewrite
add/set/remove header automatically in the route created by APISIX:
annotations:
k8s.apisix.apache.org/rewrite-target-regex: ^/api/authentication/(.*)
k8s.apisix.apache.org/rewrite-target-regex-template: "/$1"
k8s.apisix.apache.org/rewrite-target-add-header: X-Forwarded-For:$remote_addr
k8s.apisix.apache.org/rewrite-target-set-header: "X-Api-Engine:apisix,X-Api-Version:v1,X-Api-useless:"
k8s.apisix.apache.org/rewrite-target-remove-header: "Cookie"
JSON Configuration exemple needed:
{
"uri": "/api/authentication/*",
"name": "Auth",
"plugins": {
"proxy-rewrite": {
"headers": {
"add": {
"X-Forwarded-For": "$remote_addr"
},
"remove": [
"Cookie"
],
"set": {
"X-Api-Engine": "apisix",
"X-Api-Version": "v1",
"X-Api-useless": ""
}
},
"regex_uri": [
"^/api/authentication/(.*)",
"/$1"
],
"use_real_request_uri_unsafe": false
}
},
"upstream_id": "or",
"status": 1
}
Thanks for your great work!
Metadata
Metadata
Assignees
Labels
No labels