javascript - nginx cross-domain configuration unsuccessful
扔个三星炸死你
扔个三星炸死你 2017-06-10 09:49:34
0
2
699

Local access path http://localhost:8081/wallet.... The port is 8081,
Now I want to access http://localhost:8082/data/de...can access the data),
The following is the nginx configuration

The following is the request address

this.$http.get('/data/demo.json').then(function(data){ alert(data.data.name); });

The error is reported as follows:

May I ask where I configured it wrong?

扔个三星炸死你
扔个三星炸死你

reply all (2)
代言

The addresses are all different, there must be no data, they are all 404. Is your data/demo.json 8082? And the access application is at 8081? You can use an agent.

    小葫芦

    Halo, access the absolute address of 8082. . .

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!