“Origin null is not allowed by Access-Control-Allow-Origin” error for request made by application running from a file:// URL

后端 未结 17 1488
孤城傲影
孤城傲影 2020-11-21 04:42

I\'m developing a page that pulls images from Flickr and Panoramio via jQuery\'s AJAX support.

The Flickr side is working fine, but when I try to $.get(url, ca

17条回答
  •  滥情空心
    2020-11-21 05:17

    We managed it via the http.conf file (edited and then restarted the HTTP service):

    
        Header set Access-Control-Allow-Origin "*"
        AllowOverride all
        Order allow,deny
        Allow from all
    
    

    In the Header set Access-Control-Allow-Origin "*", you can put a precise URL.

提交回复
热议问题