koajs/compress

What is compressed?

felixsanz opened this issue · 1 comments

Is both header and body compressed? or just body?

Also, what happens if i have already compressed the body myself (using brotli for example). Will thise cause an issue? (re-compress is not a good idea). What happens in this case?

just the body. headers can only be compressed at the HTTP level

Also, what happens if i have already compressed the body myself (using brotli for example). Will thise cause an issue? (re-compress is not a good idea). What happens in this case?

if content-encoding is already set, then this middleware will not do anything. so make sure you set a content-encoding header if you've compressed the body yourself.