我正在尝试为我的域配置入口重写规则,如下所示https://example.com/?page=emailVerify&token=fhgfgfkhfkfkhfhjfhfhj&lang=en_US
收件人:https://example.com/my_api/?page=emailVerify&token=fhgfgfkhfkfkhfhjfhfhj&lang=en_US
我尝试使用注解,但它替换了etire查询字符串
nginx.ingress.kubernetes.io/app-root: /my_api/$1发布于 2020-08-24 22:06:02
您可以使用永久重写。看一下:nginx-rewrite-rules-to-re-write-every-match-of-a-certain-regex-except。
您还可以使用注释nginx.ingress.kubernetes.io/rewrite-target。将以下行添加到入口定义中:nginx.ingress.kubernetes.io/rewrite-target: my_path/$1
有用的文章:nginx-rewrite-examples。
https://stackoverflow.com/questions/63533797
复制相似问题