Add express cookie-parser middleware to express-gateway
# system.config.yml
plugins:
express-gateway-plugin-cookie-parser:
package: 'express-gateway-plugin-cookie-parser'
# gateway.config.yml
pipelines:
api:
policies:
- proxy:
- condition:
name: expression
expression: "req.cookies.username === 'admin'"
# system.config.yml
plugins:
express-gateway-plugin-cookie-parser:
package: 'express-gateway-plugin-cookie-parser'
secret: 'my-secret'
option:
desc1: 'An object that is passed to cookie.parse as the second option.'
desc2: 'See https://www.npmjs.com/package/cookie for more information.'