if you want to set your port back top 8000: Check React's Proxy
Configuration: pip install django-cors-headers
# settings.py
INSTALLED_APPS = [
# ...
'corsheaders',
# ...
]
MIDDLEWARE = [
# ...
'corsheaders.middleware.CorsMiddleware',
# ...
]
On Tue, Jan 23, 2024 at 4:34 PM Raymond Nsubuga <[email protected]>
wrote:
> Am working on a django react project but everytime i run my django server
> at port 8000, it instead redirects to port 3000 belonging to react
> automatically, what is the issue that can be causing this ?. And how am i
> able to solve 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJpDcBTvmMd94%2BBnr3aN3c7VGv3m80opQDm7kiA83YxkZpEkHA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJpDcBTvmMd94%2BBnr3aN3c7VGv3m80opQDm7kiA83YxkZpEkHA%40mail.gmail.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/CAMc8uwNji2THLtaMKpjkNrv-voTJF2hBOMQjFxN9xPzgqp4rqQ%40mail.gmail.com.