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
    0

    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 4888 posts 17641 karma points MVP 2x admin c-trib
    Jun 09, 2016 @ 20:56
    Alex Skrypnyk
    0

    Hi Chris,

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

    http://benfoster.io/blog/aspnet-web-api-compression

    Cheers,

    Alex

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

    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">
        <system.webServer>
            <urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
        </system.webServer>
    </location>
    

    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:

Draft