WordPress Ninja Forms, Access-Control-Allow-Origin and admin-ajax.php

So, I have this WP installed on Heroku and I’ve installed Ninja forms to it. Despite everything working OK locally, when I push it to Heroku, the form is not submited and I receive this error through the Chrome’s Console:

Failed to load https://ratts.com.br/wp-admin/admin-ajax.php: No 
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://ratts.com.br' is therefore not allowed 
access. The response had HTTP status code 503.

It’s worthy to mention that this error is only delivered when I access the page via http, but when I access the page trough https the form works just fine, due to what I think to be a CORS problem. Anyone has any idea about how can I solve this issue? It have been three days of unsuccessful research already… rsrs

Leave a Comment