title: Angular Service not hitting API endpoint
body: <p>I'm trying to test out a service called vpnblocker, which will detect if user is using a VPN or not. I'm following the <a href="https://vpnblocker.net/usage/api-parameters/" rel="nofollow noreferrer">documentation</a> and <a href="https://vpnblocker.net/usage/api-variables/" rel="nofollow noreferrer">API variables</a> and I've set up my angular service to call API, but it never returns any values. Nothing outputs between the console.logs in ngOnInit. Why is that?</p>
  
  <p>angular component</p>
  
  <pre><code>ngOnInit() {
      console.log("VPN IS RUNNING FUNCTION START");
      this.loginService.vpnIsRunning().subscribe(res =&gt; {
        console.log(res);
      });
      console.log("VPN IS RUNNING FUNCTION END");
  
    }
  </code></pre>
  
  <p>angular service</p>
  
  <pre><code>    vpnIsRunning() {
      let format = "json";
      let ip = "45.87.214.236";
      return this.http
        .get&lt;{
          posts: any;
        }&gt;(`http://api.vpnblocker.net/v2/${format}/${ip}`)
        .pipe(
          map(retrievedData =&gt; {
            return {
              posts: retrievedData.posts.map(post =&gt; {
                return {
                  status: post.status,
                  ipaddress: post.ipaddress,
                  msg: post.msg
                };
              })
            };
          })
        );
    }
  </code></pre>
  
  <p>console</p>
  
  <pre><code>Access to XMLHttpRequest at 'http://api.vpnblocker.net/v2/json/72.238.50.117' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  login.component.ts:60 HTTP Error HttpErrorResponse {headers: HttpHeaders, status: 0, statusText: "Unknown Error", url: "http://api.vpnblocker.net/v2/json/72.238.50.117", ok: false, …}
  zone-evergreen.js:2952 Cross-Origin Read Blocking (CORB) blocked cross-origin response http://api.vpnblocker.net/v2/json/72.238.50.117 with MIME type text/javascript. See https://www.chromestatus.com/feature/5629709824032768 for more details.
  </code></pre>