- mysite.mysharepoint.com has clientside code that wants to access a list on mysharepoint.com due to whatever reason.
- the Same-origin policy forbids this
While this is easily possible, I tend to avoid serverside code.
- all front-end servers have to be modified
- hardware changes can affect the outcome
For Apps SharePoint provides some ways to enable cross-domain calls. (
SP.WebProxy) so you could communicate with the app and the app communicates cross domain. Same for CSOM apps while you here can work without the policy.
- need of an app
Editing your own web-service's web.config isn't as critical as editing the SharePoint one. The web-service itself could access the data via SSOM (needs to be hosted on a SP server) or CSOM (much more the 2013 way). If configured correct, the service returns JSONP which can be consumed.
- need of an web-service
If you have any suggestions or know other ways to solve the problem (SP365 Custom Action?) feel free to add them to this collection.