Socket
Socket
Sign inDemoInstall

express-gateway-plugin-body-modifier-example

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-gateway-plugin-body-modifier-example

A body modifier plugin for Express Gateway


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

express-gateway-plugin-body-modifier

This plugin for Express Gateway makes it possible rewrite request and response body before these get proxied to the target serviceEndpoint or returned back to the client

Installation

Simply type from your shell environment:

eg plugin install express-gateway-plugin-body-modifier

Quick start

  1. Make sure the plugin is listed in system.config.yml file. This is done automatically for you if you used the command above.

  2. Add the configuration keys to gateway.config.yml file.

policies:
  - body-modifier:
      action:
        request:
          add:
          - name: fullname
            value: req.body.name + ' ' + req.body.surname
          remove:
          - name
          - surname
        response:
          add:
          - name: createdBy
            value: "'Clark Kent'"
          remove:
          - uselessParam

Want to make your own plugin?

Just check out our plugin development guide. We can't wait to see your custom stuff in the Gateway!

Keywords

FAQs

Package last updated on 03 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc