This error is showing after I keeps running ng serve --disable-host-check and have enable for all origin on python django rest framework Access to XMLHttpRequest at 'localhost:8000/supplier/' from origin 'http://localhost:4200' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, edge, chrome-untrusted, https, isolated-app.
Asked
Active
Viewed 80 times
0
-
you need to setup CORS in Django. its the browser that stops you. And it is a server issue. Just lookup CORS. and how to setup. – Henrik Bøgelund Lavstsen Oct 21 '22 at 07:46
-
Hello! Hope this link help you! https://stackoverflow.com/a/35761088/13642816 – gzn Oct 21 '22 at 07:47
-
Does this answer your question? [How can I enable CORS on Django REST Framework](https://stackoverflow.com/questions/35760943/how-can-i-enable-cors-on-django-rest-framework) – kotatsuyaki Oct 25 '22 at 03:09