express-http-proxy icon indicating copy to clipboard operation
express-http-proxy copied to clipboard

Update docs to show that req is passed to host resolver function. [ was: Request obj in host param ]

Open kouga00 opened this issue 6 years ago • 2 comments

Hello, is it possible to access to request object in host param like this?

const proxy = require('express-http-proxy'); proxy((req, res) => req.proxyUrl)

kouga00 avatar Mar 26 '18 09:03 kouga00

When the host argument is a function, that function is passed the req as the first and only parameter.

host(req) {
}

I'll update the docs.

monkpow avatar Mar 26 '18 13:03 monkpow

Doc not updated!

devalexqt avatar Nov 15 '18 20:11 devalexqt