Hello i am using drf to create api for viewing User profile and relevant information, during Sign up and log in there were no issues as it didn’t required any headers but now since user is logged in i have created a JWT token for authentication and i am using that token to verify the user, my backend is in DRF while front end is on React, i have configured my settings in order to allow access to all origins but this issue is still there and i have tried so many different work arounds but to not affect. This is the error:
Access to XMLHttpRequest has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Although i have configured it
1 Like
are you having that problem in local or in prod ?
if prod, where did you deploy your app? you can use the app django cors headers, an allow your frontend domain for cross site requests
in local, i used ngrok to make my local live, i have used the django cors headers and added the relevant setting in settings.py to allow all origin but still receiving this error
I have the same problem and I have tried all the config on your website but it is still happening