reCaptcha in Angular2 with localhost

420 views
Skip to first unread message

Marina Alvarez

unread,
Jan 5, 2017, 2:02:31 PM1/5/17
to reCAPTCHA
Hello everyone!
I am trying to implement the reCaptcha in my Angular 2 project, the domain is the local host, but unfortunately I am not succeeding.
This error message: "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 405." appear all time : (   , somebody can help me?
Thanks in advance!

Saad Abdullah

unread,
Jan 23, 2017, 10:40:12 PM1/23/17
to reCAPTCHA
You can do two things
-> use this package https://github.com/mllrsohn/angular-re-captcha

OR

Access-Control-Allow-Origin is due to cors issue. You have to allow CORS on server in order to make successful request.
Response code 405 ? Are you trying to make a get request to post endpoint ?
Reply all
Reply to author
Forward
0 new messages