English 中文(简体)
Cloudfoundry 的远程用户
原标题:remoteAddr in Cloudfoundry

我开发了一个识别访问国的 grails 应用程序。 我将应用程序推到云端, 效果也很好, 但远程地址的所有值都是内部的, 例如 172. 30. 49. 25, 因此我的应用程序无法识别任何国家 。 我在< a href=> http://www.ip2place.com/demo" rel=“nofollow> http://www.ip2place.com/demo - 相同的结果中尝试了这个地址 。

问题是:我怎样才能得到在云雾中部署的圣杯或爪哇应用软件用户的实际IP地址?

问题回答

您应该可以从 X- Cluster- Client-IP X- forward- for HTTP 请求信头获得这些数据。

类似 :

request.getHeader("X-Cluster-Client-IP")




相关问题
HTTPS node app on Cloud Foundry

Is it possible to deploy a node.js app on Cloud Foundry that listens for HTTPS requests on port 443? I can find various references to SSL support in the Cloud Foundry forums, but no actual examples ...

Why can t Cloud Foundry load mongo_mapper?

I ve uploaded a simple Ruby test application to Cloud Foundry that works on my machine™, but it gives the following error on the site. ====> logs/stderr.log <==== /var/vcap/data/packages/...

CFML system environment variable (OpenBD)

How do I access the system environment variables in CFML? It is required to read out the CloudFoundry database connectivity settings. The variable required is "VCAP_SERVICES". Is there a function ...

热门标签