django 跨越报错 ?: (corsheaders.E013) Origin '127.0.0.1:8080' in CORS_ORIGIN_WHITELIST is missing schem

?: (corsheaders.E013) Origin ‘127.0.0.1:8080’ in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin ‘localhost:8080’ in CORS_ORIGIN_WHITELIST is missing scheme

原来格式

CORS解决跨域请求

CORS_ORIGIN_WHITELIST = (
‘127.0.0.1:8080’,
‘localhost:8080’,

)

根据他的错误提示进行如下修改

CORS_ORIGIN_WHITELIST = (
‘http://127.0.0.1:8080’,
‘http://localhost:8080’,

)

你可能感兴趣的:(python,Django)