“Django-Cors-Header” Code-Antworten

Django-Cors-Header

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

Django-Cors-Header

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

Zugangskontroll-Allow-Origin Django

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

Django-Cors-Header

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

Django-Cors-Header

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

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen