pull/232/head
wangchuxiao 3 years ago
parent d7283b92ac
commit 6c324414b1

@ -32,6 +32,17 @@ metadata:
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/server-snippets: |
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
# 使用重写后的路径进行路由
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$1"
@ -43,9 +54,8 @@ spec:
paths:
- backend:
service:
name: msg-gateway
port:
number: 10001
serviceName: msg-gateway
servicePort: 10001
path: /msg-gateway/(.*)
pathType: Prefix
---

Loading…
Cancel
Save