CORS error is not an issue with angular. You need to fix it on the api.
Accept headers on the api. You should also allow calls from http localhost
(whitelist). This can slightly vary depending on the language you're using
for the api.
All the best.

On Tue, Nov 10, 2020, 22:55 Johannes Hillert <[email protected]>
wrote:

> Hey,
>
> it is supposed to do that.
>
> See:
>
>    - Cross-Origin Resource Sharing (CORS)
>    <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>
>    - Same-origin policy
>    <https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy>
>
> Does the problem persist if you access 'https://pro-api...' from an
> origin with HTTPS scheme?
>
> This describes how to serve the local app over HTTPS: Get angular-cli to
> ng serve over HTTPS <https://stackoverflow.com/a/44055209/4076983>
>
> Settings this might also help: Access-Control-Allow-Origin
> <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin>
>
> Kind regards,
> Johannes
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/angular/c4c7de9b-1b70-4fe4-bc25-c47e9062043an%40googlegroups.com
> <https://groups.google.com/d/msgid/angular/c4c7de9b-1b70-4fe4-bc25-c47e9062043an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/CANd8XNtJJqXeBzC619Ae2P%2BZi71wkeAjEu5u5fDVXMA_RG%3Drow%40mail.gmail.com.

Reply via email to