(fastifyServer, forHeader, path, protoHeader)
| 7 | const buildRequest = Request.buildRequest |
| 8 | |
| 9 | const fetchForwardedRequest = async (fastifyServer, forHeader, path, protoHeader) => { |
| 10 | const headers = { |
| 11 | 'X-Forwarded-For': forHeader, |
| 12 | 'X-Forwarded-Host': 'fastify.test' |
| 13 | } |
| 14 | if (protoHeader) { |
| 15 | headers['X-Forwarded-Proto'] = protoHeader |
| 16 | } |
| 17 | |
| 18 | return fetch(fastifyServer + path, { |
| 19 | headers |
| 20 | }) |
| 21 | } |
| 22 | |
| 23 | const testRequestValues = (t, req, options) => { |
| 24 | if (options.ip) { |