We need to consume external Api REST and dynamically update content on our website and are faced with the age-related problem of cross-site scripting and Ajax.
I read JSONP, but I don’t want to go this route in a million years, as it seems really quite a dirty hack.
How to solve this problem it’s “correct” and “right” to have a local service that acts as a proxy for any requests to external Api? Thus, on the client there would be an Ajax call on ../RestProxy/MakeRequest, passing him the request details, which he must execute for the external api, he executes the request and returns everything that has passed.
Any thoughts would be appreciated.
David source
share