Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to call http://localhost Azure Function from https://localhost node app

I have one Node.js Azure function running on a Windows 11 system at http://localhost:7071/api/FunctionName.

I can execute the function by calling it from a browser window no problem.

Now when I call it from another node app running on localhost with axios or fetch, I get an ECONNREFUSED error.

I get the same results whether I'm running from NPM start or inside VS Code. It works fine on one system.

Any suggestions? - this used to work no problem.

Thanks.

like image 497
Michael S. Scherotter Avatar asked Oct 21 '25 06:10

Michael S. Scherotter


1 Answers

I just figured out a fix - calling the localhost IP address directly works: http://127.0.0.1/api/FunctionName.

Now I need to figure out what caused the configuration change.

like image 165
Michael S. Scherotter Avatar answered Oct 23 '25 21:10

Michael S. Scherotter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!