I'm trying to use the proxy field in package.json to proxy my fetch calls to aws api gateway endpoint. I've tried million of ways and still it's not working. my setup is:
"proxy": {
"/DEV/*": {
"target": "https://xxx.execute-api.eu-west-1.amazonaws.com",
"secure": false
}
}
I also tried other 1000 combinations (secure to true , changeOrigin or /DEV) and also:
"proxy": "https://xxx.execute-api.eu-west-1.amazonaws.com",
even I tried restart my pc :) my call is:
return fetch('/DEV/servers', {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'session': getState().authReducer.auth.session
}
unfortunately no success, still it tries to call http://localhost:9000/DEV/servers wonder if I needed to do something else first which I haven't done. Thanks