I’m trying to replace my current web server, openresty, which handles request decompression via a lua script. Is it possible for Caddy to handle a compressed request? (not compressed responses, I know that’s possible)
What I need Caddy to do is to identify this is a compressed message (--compressed) that’s gzip encoded (--header 'Content-Encoding: gzip' ) and decompress that request before passing it on to the upstream server.
I don’t think that’s supported right now (unless Go stdlib handles it already transparently), but it shouldn’t be too hard to implement with a plugin if you need it.
I setup a test caddy instnace to see if it would work (fingers crossed) out of the box…unfortunately it didn’t. It just passes the request along as-is with out decompressing it. So better than erroring out or something but not what I would like.
I thought about a plugin, just don’t know where to start (and I don’t know go so I’ll need to figure that out too. I’m pretty good with a few other languages, just never used go). My thought, too, was that it would be pretty easy in a plugin…hopefully I’m not wrong