How to Solve Vue & Django Cross-domain Issue

1. Install the package to solve cross-domain related problems at the terminal

python -m pip install django-cors-headers

2. Add the following configuration to the setting.py file clock in the django project

‘corsheaders’,

comment csrf out and add  ‘corsheaders.middleware.CorsMiddleware’,

finally add these two lines of configuration

Read More: