1👍
By using ‘’cross-origin resource sharing (CORS)’’
In Django settings you can set a list of all domains where requests to your API server are allowed to originate.
Like so
CORS_ALLOWED_ORIGINS = [ "http://localhost:8080", "http://127.0.0.1:9000" ]
Source:stackexchange.com