No 'Access-Control-Allow-Origin' header is present on the requested resource -- But it is?

My /etc/apache2/sites-enabled/ on a remote server looks like this…

<VirtualHost *:80>
        Header set Access-Control-Allow-Origin "*"
        DocumentRoot /home/rbpb/var/www/
        ErrorLog /home/rbpb/var/www/
        CustomLog /home/rbpb/var/www/ combined

I'm running a Django project on my local machine. The project makes a GET request to the remote server to read a JSON file:

But I see this error in my browser's console.

Failed to load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

I see nothing in my error.log.

How do I correctly set the 'Access-Control-Allow-Origin' in my .conf file?

1 Reply

Have you already implemented Django CORS Headers? What does your GET request look like?

More info


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct