Django Rest framework

134 views
Skip to first unread message

Denny (Python developer)

unread,
Nov 13, 2023, 7:54:29 AM11/13/23
to Django users
i hosted my django application to vercel and am using free postgress database from railway so when i try to register the user i get an error  attached below. when i connect my endpoints with fronted of which am using React i get an error cors origin assist me please 
Screenshot (27).png

Denny (Python developer)

unread,
Nov 13, 2023, 7:55:32 AM11/13/23
to Django users
i think the the error is from vercel itself assist me my tech guys

Vishesh Mangla

unread,
Nov 13, 2023, 8:19:35 AM11/13/23
to django...@googlegroups.com
Don't use postman for gui based login 

--
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 django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/55866942-048b-4c25-8b81-e4d259dca936n%40googlegroups.com.

Vishesh Mangla

unread,
Nov 13, 2023, 8:19:48 AM11/13/23
to django...@googlegroups.com
Use selenium

Denny (Python developer)

unread,
Nov 13, 2023, 8:31:42 AM11/13/23
to Django users

i need assistance on deployment maybe vercel is not working on my side 

Lutaaya Jamil

unread,
Nov 13, 2023, 6:13:25 PM11/13/23
to Django users
You can correct me if I am wrong, but there is something to do with

Cross-Origin Resource Sharing (CORS) in Django which somehow is set to prevent unauthorized domains from accessing information from another domain. So, I suggest if that is the issue, follow the steps that start by installing the django-cors-header, and add your new url to ALLOWED_HOSTS list in settings.py

Akorede Habeebullah

unread,
Nov 14, 2023, 3:52:26 AM11/14/23
to django...@googlegroups.com
Try using django-cors-headers. It should work.
You can check it's documentation for how to use it.

OSP PRO

unread,
Nov 14, 2023, 9:17:49 AM11/14/23
to django...@googlegroups.com

utibe solomon

unread,
Nov 18, 2023, 3:06:32 AM11/18/23
to 'Kasper Laudrup' via Django users
It has to do with cors headers you don't have it set so your domain wouldn't share resources with another domain check out django-cors-headers

On Mon, Nov 13, 2023, 1:55 PM Denny (Python developer) <dennisk...@gmail.com> wrote:
i hosted my django application to vercel and am using free postgress database from railway so when i try to register the user i get an error  attached below. when i connect my endpoints with fronted of which am using React i get an error cors origin assist me please 

--
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 django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages