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).
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.
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?
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
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.
I don't have a solution to this issue yet, so if anyone are able to give an answer, you're more than welcome :-)
is working on a reply...