search

Home  >  Q&A  >  body text

javascript - nginx cross-domain configuration unsuccessful

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?

扔个三星炸死你扔个三星炸死你2782 days ago859

reply all(2)I'll reply

  • 代言

    代言2017-06-10 09:51:34

    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.

    reply
    0
  • 高洛峰

    高洛峰2017-06-10 09:51:34

    Halo, access the absolute address of 8082. . .

    reply
    0
  • Cancelreply