Description
Hi,
I am facing an issue to call apis behind corporate proxy to AWS backend server. I need to deploy the vue.js frontend on a corporate network, which has proxy setup for security reasons. In order to send http request to outside network, the request has to go through the proxy. So far I have tried 4 things
-
use axios 'proxy' param
let ax = axios.create(proxy: {host: , port: })
ax({method: 'get', url: }.then(...).catch(...)) -
use https agent
const HttpsProxyAgent = require('https-proxy-agent');
const axiosDefaultConfig = {
proxy: false,
agent: new HttpsProxyAgent('')
};
const ax = require('axios').create(axiosDefaultConfig);
ax({method: 'get', url: }.then(...).catch(...)) -
https tunnel
-
using fetch instead of axios, and add https agent to fetch.
None of them works to pass the api through proxy. I am not getting an error message in any case, and by pulling out the network log I knew the api was never attempt to send through proxy. It is always from my local machine directly to the aws server.