This plugin for Express Gateway makes it possible to compress responses from Service Endpoints, based on ExpressJS's Compression Middleware.
Simply type from your shell environment:
eg plugin install express-gateway-plugin-compression
-
Make sure the plugin is listed in system.config.yml file. This is done automatically for you if you used the command above.
-
Add the configuration keys to gateway.config.yml file.
policies:
- compression:
- action:
threshold: 1024
- proxy:
- action:
serviceEndpoint: backend
Details regarding action parameters may be found in the compression
package's documentation.
Just check out our plugin development guide. We can't wait to see your custom stuff in the Gateway!