新文章 网摘 文章 随笔 日记

ASP.NET中获取当前域的最佳方法是什么?

$"{Request.Url.Scheme}{System.Uri.SchemeDelimiter}{Request.Url.Authority}"


https://stackoverflow.com/questions/61817/whats-the-best-method-in-asp-net-to-obtain-the-current-domain


如何检查请求来自同一域

if(Request.Url.Host!==Request.UrlReferrer.Host){
       request come from different domain
}


https://forums.asp.net/t/2028984.aspx?How+to+check+request+is+coming+from+same+domain
 
posted @ 2020-11-26 09:55  岭南春  阅读(68)  评论(0)    收藏  举报