Added code for cross-origin resource sharing