express-gateway-plugin-cookie-parser

1.1.4 • Public • Published

express-gateway-plugin-cookie-parser

Add express cookie-parser middleware to express-gateway

Usage

# 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'"

With advanced configuration:

# 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.'

Package Sidebar

Install

npm i express-gateway-plugin-cookie-parser

Weekly Downloads

22

Version

1.1.4

License

MIT

Unpacked Size

540 kB

Total Files

12

Last publish

Collaborators

  • ndthanhdev