Open vinnytwice opened 3 years ago
Update:
I tried starting the proxy with lcp --proxyUrl https://localhost:3000 --port 3001
in terminal and got :
Proxy Active
Proxy Url: https://localhost:3000
Proxy Partial: proxy
PORT: 3001
Credentials: false
Origin: *
To start using the proxy simply replace the proxied part of your url with: http://localhost:3001/proxy
so in my Flutter web app I make the request to String uri = 'http://localhost:3001/proxy/api/products';
but I get net::ERR_CONNECTION_REFUSED
error.
What am I doing wrong??
I'm trying to test endpoints of my Node.js app running on localhost:3000 making requests from my Flutter web app running on localhost:5000 and I get the infamous
'No 'Access-Control-Allow-Origin' header is present on the requested resource.' error
. So I'm trying to use local-core-proxy.. In my package.json scripts I added "proxy": "lcp --proxyUrl http://localhost --port 3000" .. and if I got right this should generatelocalhost:3000/proxy
domain which I 'd use for my request as:But when making the request I still get the error:
Am I missing to set something? Many thanks for this package.