maybe yes
I get this error
Proxy error: Could not proxy request /api/islogged from localhost:3000 to https://www.example.com.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (CERT_HAS_EXPIRED).
if the proxy in the package.json is configured in this way:
"proxy": {
"/api-rc": {
"target": "https://www.example.com",
"pathRewrite": {
"^/api-rc": "/api"
}
}
I tried to resolve it in two ways:
if(process.env.NODE_ENV === 'development'){
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
}
and
export const get = (url, params) =>
const agent = new https.Agent({
rejectUnauthorized: false
});
const p = params ? {httpsAgent: agent, params: {...params}} : {};
return axios.get(url, p)
};
but the error is still there . Am I wrong something?
Have you tried adding changeOrigin: true and/or secure: false?
Thank you..now it works
@Nide83 glad to help. You may close this issue in case your problem was resolved.
Most helpful comment
Have you tried adding
changeOrigin: trueand/orsecure: false?