Skip to content

how pass along request to next middleware in stack? #1498

Open
@hpl002

Description

@hpl002

Request terminates in middleware. There is however an option "option.onProxyRes" that allows you to further handle the request as you wish in the onProxyRes handler.

However, this handler only takes proxyRes, req, res as args. How may i then call the next middleware in my stack?

Excerpt from readme:

function onProxyRes(proxyRes, req, res) {
  proxyRes.headers['x-added'] = 'foobar'; // add new header to response
  delete proxyRes.headers['x-removed']; // remove header from response
}

Fairly new to express so please excuse me if this is a silly question..

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions