[英]App ID login flow removes ingress service root path after successful login
I'm facing the following error while running Node.js WEB app on IBM Cloud Kubernetes with AppId: The WEB app is accessed via ingress URL: https://<host url>/ar-studio
我在使用 AppId 在 IBM Cloud Kubernetes 上运行 Node.js WEB 应用程序时遇到以下错误:WEB 应用程序是通过入口 URL 访问的:
https://<host url>/ar-studio
ar-studio is the backend service path as is configured in ingress. ar-studio是在 ingress 中配置的后端服务路径。 index.html has the following HTML line
index.html 有以下 HTML 行
<div class="button"><a id="signin" href="protected/protected.html" title="Sign In to service">Sign In to service</a></div>
https://<host url>/protected/protected.html
instead of using the service root path https://<host url>/ar-studio/protected/protected.html
https://<host url>/protected/protected.html
而不是使用服务根路径https://<host url>/ar-studio/protected/protected.html
How can I fix it so the browser will be redirected to https://<host url>/ar-studio/protected/protected.html
?如何修复它以便浏览器将被重定向到
https://<host url>/ar-studio/protected/protected.html
? The app works great without ingress, on my local docker engine.在我的本地 docker 引擎上,该应用程序在没有入口的情况下运行良好。 Here are the relevant ingress yaml fields (some values replaced with
...
for security reasons):以下是相关的入口 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.