You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/08 08:27:40 UTC
[GitHub] [apisix-ingress-controller] wenhuwang commented on issue #1444: request help: How to config regex based http request header customization?
wenhuwang commented on issue #1444:
URL: https://github.com/apache/apisix-ingress-controller/issues/1444#issuecomment-1306820211
> Can you explain more clearly what are dynamic complex scenarios?
>
> If you want to be very flexible and include logic, maybe a serverless plugin would be a good choice
For example, Ingress-nginx supports to inject a piece of nginx configuration, as follows:
```
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: test-ingress
namespace: demo
labels:
app: test-ingress
annotations:
nginx.ingress.kubernetes.io/configuration-snippet: >
set $headerprefix "";
if ($http_referer ~* http?://([0-9a-z-]*)(.+)) { set $headerprefix $1; }
proxy_set_header header01 $headerprefix;
spec:
ingressClassName: nginx
rules:
- host: test.ft.com
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: servicea
port:
number: 8080
```
Is it possible to achieve a similar effect with apisix-ingress?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org