-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Labels
Description
Is your feature request related to a problem? Please describe
Corporate environments often require some/all egress traffic to pass through a forward proxy. In nginx+njs, subrequests cannot be used for this (nginx oss/plus lacks HTTP CONNECT support), so ngx.fetch()
is the only outgoing http client available inside njs. Today ngx.fetch()
has no way to use a connect method.
Describe the solution you'd like
await ngx.fetch(url, {
method: 'GET',
headers,
body,
proxy: 'http://user:pass@proxy.example.com:3128',
proxy_auth: { scheme: 'basic' } // maybe this is unnecessary
});