0

我创建了 3 个项目网站、WebApi 和 CoreAuthWebApi。他们都相互影响。

这是请求流程:

网站 --> WebApi --> CoreAuthWebApi
CoreAuthWebApi --> WebApi --> 网站

CoreAuthWebApi 在没有 IP 欺骗的情况下获取网站客户端 IP 的最佳方式是什么?

4

1 回答 1

1

What is the best way for CoreAuthWebApi to get the WebSite Client IP without IP spoofing?

If the call is made on behalf of the web site, the API has no way of knowing the IP of the user agent unless you pass it as parameter. Remember the client of the API in this case is the IP of the server where the website is hosted.

Since the website knows the IP of the user agent it can pass it to the API as parameter.

于 2013-06-06T13:56:50.823 回答