Changing the code as it is not possible to set Cross-origin resource sharing here.