使用URL重写从非ASP .net应用程序不起作用,从响应中删除Server标头。

时间:2017-09-05 04:36:08

标签: angular http iis http-headers iis-8.5

使用url rewrite出站规则从响应中删除服务器变量不起作用。应用程序是角度4应用程序,我的服务器是带有iis 8.5的Windows 8,我有我的web.config数据,如下所示。

function getCalendar(target_div,year,month){
        $.ajax({
            type:'POST',
            url:'functions.php',
            data:'func=getCalender&year='+year+'&month='+month + '&uid=<?php echo $u_id ; ?>',
            success:function(html){
                $('#'+target_div).html(html);
            }
        });
    }

1 个答案:

答案 0 :(得分:2)

你需要添加这个

<system.webServer>
  <security>
     <requestFiltering removeServerHeader="true"/>
  </security>
</system.webServer>