Solving Angular JS CORS issue

Making HTTP requests from Angular was painful for me at the beginning. Due to CORS issue I wasn't able to make calls to external services. Trying different solutions I came up with one which I think quite easy to implement.

Perform an update using Angular's $resource and Spring Data REST