Chrome and safari CORS fix. added content type to xhr request