scdoshi/jquery-ajaxchimp

403 (Forbidden) No Access-Control-Allow-Origin

Closed this issue · 1 comments

I am getting this on a new page that I am trying to submit a form via ajaxchimp...my first form was on the home landing page and it doesn't have any issues:

OPTIONS https://mylist.us3.list-manage.com/subscribe/post-json?u=…&EMAIL=email%40gmail.com&REGION=US-IL&_=..... 403 (Forbidden)

OPTIONS https://mylist.us3.list-manage.com/subscribe/post-json?u=…&EMAIL=email%40gmail.com&REGION=US-IL&_=..... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.

XMLHttpRequest cannot load https://mylist.us3.list-manage.com/subscribe/post-json?u=…&EMAIL=email%40gmail.com&REGION=US-IL&_=..... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.

Any ideas?

Figured it out. $.ajaxSetup({ crossDomain: false }); was set somewhere earlier.

I just had to $.ajaxSetup({ crossDomain: true }); before sending the form.