.netazure

How disable gzip on azure function app?


The gzip for azure functions app is enabled by default, is there any way to disable it?

I tried to edit the web.config file but there is no place to access the file system on the server.


Solution

  • You could edit urlCompression in the LocalSiteRoot/Config/applicationhost.config via Kudu Debug console(CMD).

    enter image description here

    <system.webServer>
        <urlCompression doStaticCompression="false" doDynamicCompression="false" />
    </system.webServer>
    

    Compression in IIS 7.x is configured with two .config file elements in the space. The elements can be set anywhere in the IIS/ASP.NET configuration pipeline all the way from ApplicationHost.config down to the local web.config file.

    For more details, you could refer to this article.