在使用 AppId 在 IBM Cloud Kubernetes 上运行 Node.js WEB 应用程序时遇到以下错误:通过入口 URL 访问 WEB 应用程序:https://<host url>/ar-studio
ar-studio是在 ingress 中配置的后端服务路径。index.html 具有以下 HTML 行
<div class="button"><a id="signin" href="protected/protected.html" title="Sign In to service">Sign In to service</a></div>
- 用户单击登录链接,IBM AppId 登录小部件将显示正确的重定向 uri。
- 用户成功登录(使用云目录),客户端页面被重定向到
https://<host url>/protected/protected.html
而不是使用服务根路径https://<host url>/ar-studio/protected/protected.html
如何修复它以便将浏览器重定向到https://<host url>/ar-studio/protected/protected.html
?该应用程序在我的本地 docker 引擎上运行良好,无需入口。...
以下是相关的入口 yaml 字段(出于安全原因,一些值已替换为):
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
ingress.bluemix.net/client-max-body-size: size=400m;
ingress.bluemix.net/rewrite-path: |
serviceName=ar-studio rewrite=/;
nginx.ingress.kubernetes.io/x-forwarded-prefix: "True"
creationTimestamp: "..."
generation: 20
name: ...
namespace: ...
resourceVersion: "..."
selfLink: ...
uid: ...
spec:
rules:
- host: dev.cvar.eu-gb.containers.appdomain.cloud
http:
paths:
- backend:
serviceName: ar-studio
servicePort: http
path: /ar-studio/
pathType: ImplementationSpecific
tls:
- hosts:
- dev.cvar.eu-gb.containers.appdomain.cloud
secretName: ...
status:
loadBalancer:
ingress:
- ip: ...