I’ve setup Fixie for use on a Heroku app. I have a Node app and using Axios to make service calls and https-proxy-agent
to configure the proxy settings:
const fixieUrl = new URL(process.env.FIXIE_URL);
console.log(`Fixie URL: ${process.env.FIXIE_URL}`);
const proxyOpts = {
host: fixieUrl.hostname,
port: fixieUrl.port || 80,
headers: {
"Proxy-Authentication":
"Basic " +
Buffer.from(`${fixieUrl.username}:${fixieUrl.password}`).toString(
"base64"
),
},
};
const httpsAgent = new HttpsProxyAgent(proxyOpts);
const axiosInstance = axios.create({
proxy: false,
httpsAgent,
headers: {
Authorization: authHeader,
},
});
When I attempt to make any call with the axiosInstance
I get this error:
‘407 Proxy Authentication Required’
I can see from my logging statement that the fixieUrl is correct and in the right format:
http://fixie:[email protected]:80
I have also tried using the .auth
with plaintext:
proxyOpts.auth = 'username:password';
I get the same result.