[英]traefik pathprefixstrip with kubernetes ingress and redirect doesn't work
I use traefik with Kubernetes Ingress with following configuration: 我将traefik与Kubernetes Ingress结合使用,配置如下:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.frontend.rule.type: PathPrefixStrip
name: loxberry
namespace: default
spec:
rules:
- host: hostname
http:
paths:
- path: /loxberry
backend:
serviceName: loxberry-service
servicePort: 80
when I try to open my service with hostname/loxberry
it gets redirected to hostname/admin/system/index.cgi
当我尝试使用
hostname/loxberry
打开服务时,它将重定向到hostname/admin/system/index.cgi
hostname/loxberry
curl to hostname/loxberry
gives me following result: 卷曲到
hostname/loxberry
给了我以下结果:
<title>LoxBerry</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="0; URL=/admin/system/index.cgi" />
Can anybody please help me? 有人可以帮我吗?
I assume that you are using Meta refresh method here for automatic redirection: 我假设您在此处使用元刷新方法进行自动重定向:
meta http-equiv="refresh" content="0; URL=/admin/system/index.cgi"
meta http-equiv =“刷新” content =“ 0; URL = / admin / system / index.cgi”
http-equiv="refresh"
method for refreshing current web page with URL
parameter 使用
URL
参数刷新当前网页的http-equiv="refresh"
方法
content
parameter specifies the time interval in seconds, here you have set 0
immediate action; content
参数指定时间间隔(以秒为单位),此处您设置了0
立即行动;
Therefore, you get redirection of hostname/loxberry
to the target hostname/admin/system/index.cgi
. 因此,您可以将
hostname/loxberry
重定向到目标hostname/admin/system/index.cgi
hostname/loxberry
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.