Cross domain Ajax request from within js file

后端 未结 7 2144
清酒与你
清酒与你 2020-11-30 10:17

Here\'s the problem:

1.) We have page here... www.blah.com/mypage.html

2.) That page requests a js file www.foo.com like this...



        
7条回答
  •  余生分开走
    2020-11-30 11:08

    The method shown above could become a large security hole. Suggest you verify the site name against a white list and build the actual URI being proxied on the server side.

提交回复
热议问题