Basic exemple that I found in documentation always throws that error. When I remove cors it works, but if I enable cors, it breaks. 