如何解决成功登录后,App ID登录流程将删除入口服务的根路径
在具有AppId的IBM Cloud Kubernetes上运行Node.js WEB应用程序时遇到以下错误:
可通过入口URL https://<host url>/ar-studio
ar-studio 是在入口中配置的后端服务路径。 index.html具有以下HTML行
<div class="button"><a id="signin" href="protected/protected.html" title="Sign In to service">Sign In to service</a></div>
- 用户单击Sign In链接,并显示带有正确的重定向uri的IBM AppId登录小部件。
- 用户成功登录(使用云目录),并且客户端页面被重定向到
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: ...
解决方法
我想您需要将App ID的bluemix注释添加到您的入口资源ingress.bluemix.net/appid-auth
-https://cloud.ibm.com/docs/containers?topic=containers-ingress_annotation#appid-auth上的说明
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。