Cross-origin resource sharing solved