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 file clock in the django project


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

finally add these two lines of configuration

Read More: