简体   繁体   English

在RESTful WCF服务中访问呼叫者的域名

[英]Access caller's domain name in RESTful WCF service

I have developed a simple RESTFul WCF service, the service has public IP an d no API key. 我开发了一个简单的RESTFul WCF服务,该服务具有公共IP和API密钥。

However I would like to limit the access to the service from certein domains. 但是,我想限制从证书域对服务的访问。 (eg only from xyz.com and not from abc.com) (例如,仅来自xyz.com,而不来自abc.com)

How can we know from which domain the call to the service is originated and is there any efficient way to filter unwanted calls in configuration level only. 我们如何才能知道对服务的调用是从哪个域发起的,是否有任何有效的方法仅在配置级别过滤不需要的调用。

This looks like a firewall problem, I would use that instead of any application level filtering. 这看起来像是防火墙问题,我将使用它代替任何应用程序级别的过滤。 It's more secure and arguably much faster. 它更安全,而且速度更快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM