For people who are developing you website, please be aware what CORS is when you are writing your code for your API and make sure it is available.
CORS stands for Cross-Origin Resource Sharing
These are some violations which can create errors and block access to an API:
- Different Domain Names
- Different Sub Domain Names [www.example.com & api.example.com are different]
- Different Port Numbers [example.com & example.com:4200 are different]
- Different Protocols [https:www.example.com & http://www.example.com are different]
If any of the above cases are true, access by any script to these resources will fail. You might get an error like this in your console developers tools:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Hope that helps.