https://pypi.org/project/django-cors-headers/
django-cors-headers
pypi.org

This package does the magic for you :) 

> On 26 Apr 2023, at 07:14, Salman Butt <[email protected]> wrote:
> 
> 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
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/8b1fc55c-b206-4fbc-9533-4ff5b521e9e5n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/8b1fc55c-b206-4fbc-9533-4ff5b521e9e5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2815830C-4A65-4F67-B810-81A3A1B99A02%40momnt.com.

Reply via email to