If your front-end web UI and back-end restful API are stored in different domains, such as:   Due to security reason, web browser will return you with the below error:   Please note that even different ports will treat as different origin. In order to allow different domains calling the restful API, you can either: