For the following ajax post request for Flask (how can I use data posted from ajax in flask?):
$.ajax({
url: \"http://127.0.0.1
I struggled a lot with something similar. Try the following:
If this doesn't help, take a look at this article. It's on PHP, but it describes exactly which headers must be set to which values for CORS to work.
CORS That Works In IE, Firefox, Chrome And Safari