javascript - How to return data directly to a client who queried via an intermediate server -


i'm trying figure out way of taking shortcut in following process:

  1. client side javascript sends xmlhttprequest a.com/core.php
  2. core.php requests data b.com/api.php via file_get_contents()
  3. data sent b.com a.com
  4. data sent a.com client

the process works flawlessly, seems me there optimization potential in way data returned client - passing data via a.com serves no practical purpose.

is there way make b.com send data directly client? , if so, information has passed a.com b.com?

diagram clarification: enter image description here


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -