azure - 在 azure 容器中的 docker 中获取客户端 IP
问题描述
有没有人可以帮助我从运行在 Azure 容器实例上的 docker 容器获取用户客户端 IP?
我的代码只获取某些东西的本地 IP,我猜它是反向代理。所以ip是10.240.255.106;是标头我也有主机 IP(公共容器 IP),但仅此而已。标头
{"Cache-Control":["max-age=0"],"Connection":["keep-alive"],"Accept":["text/html,application/xhtml+xml,application/xml;q =0.9,image/webp,image/apng, / ;q=0.8"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9 ,ru-RU;q=0.8,ru;q=0.7"],"Host":["23.99.249.54"],"User-Agent":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit /537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"],"Upgrade-Insecure-Requests":["1"],"DNT":["1"]}
有没有办法获得真正的客户端IP?
解决方案
不,ACI 不保留客户端 IP。您可以在用户语音中创建功能请求。 https://feedback.azure.com/forums/602224-azure-container-instances?filter=top&page=1
推荐阅读
- python - pyspark 中的单热编码,连续多个 1
- python - Python 如何读取 .txt 文件中的行并将它们拆分为列表?
- matlab - 在 Matlab 中从 Gumbel 分布中绘制随机数
- c++ - 具有默认模板类型的默认构造函数的类型推导
- javascript - 使用 Node js Await/Async 函数
- sparql - 使用 fuseki 在本地对大型 TTL 文件运行 sparql 查询
- c++ - 在opencv c ++中屏蔽图像和视频
- xml - 如果引用匹配,则生成元素值的所有组合
- sed - sed 命令中的变量
- sql - 如何简化 Oracle DB 的查询?