How do I disable HTTP headers on Windows Azure Web site?

Source: Internet
Author: User
Keywords Azure azure http Head

The HTTP headers included in the request and response are part of the HTTP communication process between the Web server and the browser. For example, the following is the head of the record in a typical response to a Web request on a typical Web site:

HTTP headers are a key part of the communication process between the client and the server. They allow the server to send information related to the request, not as part of the content itself. For example, the Content-length header tells the browser the length of the content to receive, and Cache-control tells the browser whether the content can cache the response.

We provide two particularly interesting headers that inform the client of the type of WEB server that provides the request and its properties. Although all WEB servers emit this type of header, many users want the server not to send this information because they want to remain anonymous to some extent. Customers have asked us to disable these headers on the http://www.aliyun.com/zixun/aggregation/13357.html ">azure Web site, so we have implemented this in the latest release of Windows Azure.

How do I disable these headers?

You can easily remove these headers through the request filtering module in IIS. To remove a header, you need the web.config file stored on the site that contains the following:

The above action deletes the Server header. X-powered-by and X-aspnet-version headers are two additional headers that many users would like to delete. To remove these two headers, Web.config needs to include the following sections. For x-powered-by, the following content is located in the <system.webserver> set:

For X-aspnet-version, the following content should be located in <system.web>:

Therefore, if you want to remove all content, Web.config will look like the following:

Of course, if you already have an existing Web.config file in your site, you need to adjust it to include one or two of the above elements.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.