“django-cors-cabeza” Código de respuesta

django-cors-cabeza

$ pipenv install django-cors-headers
# or
$ pip install django-cors-headers
Salo Hopeless

django-cors-cabeza

CORS_ALLOWED_ORIGINS = [
    "https://example.com",
    "https://sub.example.com",
    "http://localhost:8080",
    "http://127.0.0.1:9000"
]
Innocent Ibis

Access-Control-Allow-Origin Django

CORS_ORIGIN_WHITELIST = (
    'google.com',
    'hostname.example.com'
)
Relieved Rattlesnake

django-cors-cabeza

python -m pip install django-cors-headers
Innocent Ibis

django-cors-cabeza

INSTALLED_APPS = [
    ...
    'corsheaders',
    ...
]
Innocent Ibis

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código