I have an API server written in Laravel(Server1), and it just takes care of RESTful APIs. I have another server written in laravel(Server2), but this server has all the front end pages etc.,
Now in order to avoid Cross-Origin requests from Server2 to Server1 for running APIs, I want to internally forward Server2's requests to Server1.
Eg: Server2 will make an ajax call to, say, http://ift.tt/1Rg9SSu
I want to internally run http://ift.tt/1STD2EB
and return its response to Server2 which will then return it to the Server2's user who made the call.
How do I implement this? Is there any way I can forward the request from server2 to server1 without having to do any processing?
Is there any recommended way of implementing front-end-server & api-server without Cross-Origin ajax calls?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire