简体   繁体   中英

phant : No 'Access-Control-Allow-Origin'

i am trying to get json data from phant to a django application but everytime I am getting the following error :

No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried adding 'Access-Control-Allow-Origin' to both node.js for phant and django but unable to get the data.

You are requesting data from phant app to django app. You need to add Access-Control-Allow-Origin header on django app.

Posting how you are adding 'Access-Control-Allow-Origin' to Django app will be helpful to answer.

You may consider using django-cors-headers . Check the configuration options carefully.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM