How to configure apache to handle multiple domains with Access-Control-Allow-Origin header?

前端 未结 2 1632
旧巷少年郎
旧巷少年郎 2021-02-02 14:30

I want to configure apache to allow XMLHttpRequests from multiple, but not all domains.

This works:

Header set Access-Control-Allow-Origin \"*\"
<         


        
2条回答
  •  情深已故
    2021-02-02 15:20

    Header always append Access-Control-Allow-Origin: "http://domain1.com"
    Header always append Access-Control-Allow-Origin: "http://domain2.com"
    

提交回复
热议问题