CORS in ionic app and django

1.2k views Asked by At

I am building an ionic app with django-rest api ,used cors header plugin in django to allow cross origin request

i set configuration

CORS_ORIGIN_ALLOW_ALL = True

to allow all the urls for testing as in the white list

CORS_ORIGIN_WHITELIST = (
        'google.com',
)

we can only give url and app runs on "file://location" .

app is running fine when i test it on browser but does'nt fetch data when i test it on emulator

Can anyone please tell how to set domain for mobile app in CORS_ORIGIN_WHITELIST=() and configuration in ionic app so that it can fetch data from django rest apis ?

Thank you in advance

0

There are 0 answers