Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Chris Thomas 1 post 71 karma points
    Jun 07, 2016 @ 12:36
    Chris Thomas

    Gzip response from UmbracoApi

    I have an API Controller extending UmbracoApiController and would like the responses to be gzipped.

    I've tried adding the relevant httpCompression and urlCompression elements to Web.Config both directly within system.webserver and also within a location element.

    This is running in Azure as a webapp but I have the same issue locally in IIS, I've checked the compression settings (both dynamic and static are enabled).

    Any suggestions?

  • Alex Skrypnyk 5221 posts 19029 karma points MVP 3x admin c-trib
    Jun 09, 2016 @ 20:56
    Alex Skrypnyk

    Hi Chris,

    It's not Umbraco related questions, it's general for webAPI controller. You can implement gzip compression like on this post -



  • Rasmus Lynggaard 109 posts 296 karma points
    Dec 20, 2018 @ 13:24
    Rasmus Lynggaard

    It might be an Umbraco related question. In Umbraco 7.2 (I think it was), the following was added to web.config. This also disables compression for the api.

    <location path="umbraco">
            <urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />

    I don't have a solution to this issue yet, so if anyone are able to give an answer, you're more than welcome :-)

Please Sign in or register to post replies

Write your reply to: