[英]IBM Cloud Code Engine: How to determine app URL from environment?
I have a Python app deployed to IBM Cloud Code Engine .我有一个部署到IBM Cloud Code Engine的 Python 应用程序。 The app needs to determine its external URL for some security configuration.应用程序需要为某些安全配置确定其外部 URL。 How can I obtain the app URL from the environment?如何从环境中获取应用程序 URL?
I looked at the list of injected environment variables , but could not find anything.我查看了注入的环境变量列表,但找不到任何内容。
We just recently added some new environment variables to help with this.我们最近刚刚添加了一些新的环境变量来帮助解决这个问题。 Depending on which region you're in they should be available today, but worst case by next week.根据您所在的地区,它们今天应该可用,但最坏的情况是下周。
The new env vars you want to look for are:您要查找的新环境变量是:
So the full URL would be: https://${CE_APP}.${CE_SUBDOMAIN}.${CE_DOMAIN}
所以完整的 URL 应该是: https://${CE_APP}.${CE_SUBDOMAIN}.${CE_DOMAIN}
If you happen to be using JOBS then there's:如果您碰巧正在使用 JOBS,那么有:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.