每个不曾起舞的日子,都是对生命的辜负
什么是跨源资源共享(CORS)
# 需要安装 pip install django-cors-headers # settings.py # 允许所有域名 CORS_ALLOW_ALL_ORIGINS = True CORS_ALLOWED_ORIGINS = [ "http://localhost:3000", "http://127.0.0.1:3000", ]