event-gateway
event-gateway copied to clipboard
Add support for gzip compression
This is a Feature Request
Description
It would be great to support gzip compression for all http traffic including requests and responses.
Use-cases
- Compress http requests and allow for the event-gateway to decompress the request
- Compress responses from the gateway
Concepts
- Allow for accepted compression types to be configured at the gateway level (during startup time) in the order that they are preferred.
- Allow for allowed compression types to be configured on a per subscription basis.
- Gateway should inspect the
Accept-Encoding
header to determine which types of compression are supported
Examples
Sending a compressed request
curl --request POST \
--url http://127.0.0.1:4000/ \
--header 'content-type: application/json' \
--header 'content-encoding: gzip' \
--data ./file.gz
Accepting a gzip response request
curl --request GET \
--url http://127.0.0.1:4000/ \
--header 'Accept-Encoding: gzip, deflate, br' \
response headers
Content-Encoding: br
Research
- https://serverfault.com/questions/56700/is-it-possible-to-enable-http-compression-for-requests
Hello @brianneisler, do we know what is the status for this feature or if this was already added to the current Serverless framework?
Hey @xoscar, AFAIK it's not been added to the framework as in the first place it has to be added to the Event Gateway. Right now it's hard to tell what is the deadline for that feature.