CORS_ORIGIN_WHITELIST is missing scheme or netloc
See original GitHub issueCORS version: 3.0 OS: Ubuntu 16.04 LTS Django: 2.2.1
As soon as I started the server this error occurred:
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
ERRORS:
?: (corsheaders.E013) Origin 'localhost:3000' in CORS_ORIGIN_WHITELIST is missing scheme or netloc
?: (corsheaders.E013) Origin 'localhost:8000' in CORS_ORIGIN_WHITELIST is missing scheme or netloc
?: (corsheaders.E013) Origin 'localhost:8080' in CORS_ORIGIN_WHITELIST is missing scheme or netloc
System check identified 3 issues (0 silenced).
My settings file contains the following settings:
CORS_ORIGIN_WHITELIST = (
'localhost:8000',
'localhost:3000',
'localhost:8080',
)
I’m using these exact settings in other apps with no issue on version 2.5.2. If I remove the items from this whitelist the errors go away.
Any insights appreciated. Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Django Localhost CORS not working
Here in this error the hint is clearly mentioning that it needs https:// HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com)....
Read more >Maple installation failing CORS_ORIGIN_WHITELIST
E013) Origin 'lms.domain.tld:19010' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc …
Read more >Django CORS Guide: What It Is and How to Enable It
Learn more about Django Cross-Origin Resource Sharing (CORS), what it is, why you should use it, and how to enable it in your...
Read more >ERRORS: ?: (corsheaders.E013) Origin '*' in ...
E013) Origin '*' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: settings.py: #注释掉下面代码中黄色背景的那段,. 复制代码.
Read more >How to Fix Django CORS Error - DZone Web Dev
Access to XMLHttpRequest at 'url'' from origin has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into this same issue, the errors go away with this:
I wrote a long changelog note about this: https://github.com/ottoyiu/django-cors-headers/blob/master/HISTORY.rst#300-2019-05-10 . Please refer to packages’ changelogs whenever you upgrade, and ensure you pin the versions you install in your
requirements.txt
.@subodhjena I’ve noticed a bug there, that
null
shouldn’t be caught by the check, issue #404 will fix that, and I’ll release version 3.0.1 doing so.