angularjs - Recaptcha request from production server -


i using cors plugin chrome , works fine when uses local machine, in production server error occurs:

no 'access-control-allow-origin' header present on requested resource. origin therefore not allowed access.

i understand problem, domain server different domain send request, understand users not add cors plugin avoid chrome specific features.

so how can off checking access-control-allow-origin concrete post request? use angular send request.

return $http({         method: 'post',         url: url,         headers:{           'content-type': "application/x-www-form-urlencoded"         },         data: $.param(data)       }); 

i need avoid error on prod server.

i ran issue few days ago , searched everywhere response. gathered, way cross-domain ajax request if have control of both of servers hosting each domain. way can add necessary headers in http requests allow cross-domain requests. if don't have control of both servers, can post php script on server can post externally , return info need. that's how resolved issue anyway. hope helps!


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -