I am developing an API in flask and trying to make a POST request with ionic gives the following error:
Error:
Failed to load http://127.0.0.1:5000/login: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
Could someone tell me why this happens?
I know it has something to do with Access-Control-Allow-Origin, but I have no idea where to put it.
I also accept any referral link.