Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29442

Why do I get CORS error when server is down?

$
0
0

I have my backend for a project in Node.js which is deployed on AWS EC2 instance it works correctly on all the APIs, but when the server is down due to any reason, a CORS error gets reflected on the client side Networks Tab in Inspect.

I don't know why we are getting CORS error, on my local when the server is not up and I run the frontend app, it gives (failed)net::ERR_CONNECTION_REFUSED error which is correct since the server is not up. So, why am I getting CORS Missing Allow Origin on Prod environment when the server is down.

I expect that when the server is down in Prod environment the client side should get message like Server is Down or any custom message in the Networks Tab of inspect instead of CORS Missing Allow Origin error.

Any solution or suggestion is appreciated.


Viewing all articles
Browse latest Browse all 29442

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>