How does the same origin policy apply to IP addresses

前端 未结 2 485
故里飘歌
故里飘歌 2021-01-05 22:51

I have a server on our company intranet that runs JBoss. I want to send API calls to this server from my machine, also on the intranet, and get the resulting XML responses u

2条回答
  •  -上瘾入骨i
    2021-01-05 23:18

    If the port, or address are different, they are different domains. If you need to access information from what is effectively another server you really have two options. One is to write some sort of reverse proxy to pass your requests from the same origin server to the secondary server.

    Alternatively, if you are in control of the secondary target, and there's no security risk in providing direct access, you could consider adjusting the secondary server to emit JSON-P responses.

提交回复
热议问题