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

后端 未结 11 1740
醉话见心
醉话见心 2020-11-22 14:27

I\'m using .htaccess to rewrite urls and I used html base tag in order to make it work.

Now, when I try to make an ajax request I get the following error:

11条回答
  •  感情败类
    2020-11-22 14:44

    Add this to you PHP file or main controller

    header("Access-Control-Allow-Origin: http://localhost:9000");
    

提交回复
热议问题