Replies: 1 comment
-
|
Would this work? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature you'd like to request
With the recent introduction of HTTP agent config through the very beneficial
keepAlive(https://nextjs.org/docs/api-reference/next.config.js/disabling-http-keep-alive) being enabled by default Next.js is starting to become opinionated about how fetch agents should work as a default.With this in mind I think it would also be a good time to introduce proxy configuration options to allow
next/image(and other future framework layer HTTP requests) to be ran from behind a proxy.The primary use-case is for applications forced to run behind an egress proxy to validate outgoing requests.
Issues/discussions describing the same problem:
Describe the solution you'd like
Solution 1 (Preferred)
Use the widely accepted HTTP_PROXY and HTTPS_PROXY variables when configuring the fetch agent.
Solution 2
An extension of the existing
httpAgentOptionsto include a proxy configuration, e.g innext.config.jsDescribe alternatives you've considered
An alternative solution is to override the HTTP agent globally like described here but with this solution it will also overwrite the keep alive that the Next.js framework introduces with great benefit.
Without access to the framework I don't see how we can merge agent configs on a per-option basis in a good way, hence the global overwriting, resulting in overriding beneficial behaviours.
Beta Was this translation helpful? Give feedback.
All reactions