Request.ServerVariables["HTTP_SEC_FETCH_DEST"]

Request.ServerVariables["HTTP_SEC_FETCH_DEST"] == "empty" 为AJAX请求
Request.ServerVariables["HTTP_SEC_FETCH_DEST"] == null 为第三方软件请求
Request.ServerVariables["HTTP_SEC_FETCH_DEST"] =="document" 为网页请求

原文地址:https://www.cnblogs.com/upshania/p/13896217.html