It ignores http_proxy and https_proxy
redi-wadash opened this issue · comments
We have setup like this:
https_proxy: http://address-of-proxy/
middlewares:
audit:
enabled: true
But it looks like audit doesn't use the proxy, hanging the request.
Oh, I did not try that. It needs a fix.
I couldn't find a way for middleware to access main config. Is that possible? Or to support it, should the config become like this so that the middleware has access to it?
middlewares:
audit:
enabled: true
https_proxy: http://address-of-proxy/
I don't mind either way but am just curious how it should work.
In verdaccio ...
const plugins = loadPlugin(config, config.middlewares, plugin_params, function(plugin) {
return plugin.register_middlewares;
});
plugins.forEach(function(plugin) {
plugin.register_middlewares(app, auth, storage);
});
thus, no config is being injected. But, it does auth
and storage
. Both has access to config property.
auth.config
storre.config
I think you do not need https_proxy: http://address-of-proxy/
in the middleware config since you an access to the config object anyway.