title: Does a RESTful API need CORS implementation anytime?
body: <p>I struggle around with CORS implementation in my client-server project. CORS means, that calls from other origins (ex. other domain) only allowed if the header contains the CORS value. </p>
  
  <p>So, for example if I host a website on www.domain.com and call an RESTful API on the same domain, everything is fine.</p>
  
  <p>But if I develop an API for an mobile application for example, the mobile does not have the same domain of the API. How could that work together? Does I need everytime the CORS implementation in my service?</p>
  
  <p>The question comes up, since I develop an Angular 2 application, that is running in dev on localhost:4200 and my API runs on localhost:8080 (build with Spring Boot). So the client throws an exception, because it's not the same origin (different port). </p>
  
  <p>The Goal is to host my API on an root server somewhere in the internet, and the client on different webspace provider (because it's just a single Page Application). The api runs with <a href="http://1.2.3.4:8080/api/v1" rel="noreferrer">http://1.2.3.4:8080/api/v1</a> and the client with <a href="http://www.example.com:80/myPage" rel="noreferrer">http://www.example.com:80/myPage</a></p>
  
  <p>So, does I need to implement Cross-Origin everytime? Or is there another way to realize that?</p>