Closed merc1er closed 3 years ago
Running the test app results in a cross origin error
python manage.py migrate python manage.py createsuperuser python manage.py runserver
In the logs:
(0.001) SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > '2021-06-21 11:44:57.252571' AND "django_session"."session_key" = 'XXX') LIMIT 21; args=('2021-06-21 11:44:57.252571', 'XXX') (0.000) SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 1 LIMIT 21; args=(1,) WebSocket CONNECT /chat_ws [127.0.0.1:51810] (0.001) SELECT "django_private_chat2_dialogsmodel"."user1_id", "django_private_chat2_dialogsmodel"."user2_id" FROM "django_private_chat2_dialogsmodel" WHERE ("django_private_chat2_dialogsmodel"."user1_id" = 1 OR "django_private_chat2_dialogsmodel"."user2_id" = 1); args=(1, 1)
In the frontend:
Hello,
That can happen if you use localhost:8000 instead of 127.0.0.1:8000 Please use 127.0.0.1:8000 for local testing (or change the url as described in #7 )
That worked! Thank you 🙏🏻
Description
Running the test app results in a cross origin error
What I Did
In the logs:
In the frontend: