Hi
I'm trying to use reCaptcha on one of CQ5.6.1 page. It is working fine on local environment(localhost) but not working on Dev/QA servers. I'm using servlet to validate. My servlet code is
protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
throws ServletException, IOException {
String secretParameter = "<My Key>";
String recap = request.getParameter("g-recaptcha-response");
PrintWriter writer = response.getWriter();
StringBuilder nsb = new StringBuilder();
//Generate URL
nsb.append("https://www.google.com/recaptcha/api/siteverify?secret=");
nsb.append(secretParameter);
nsb.append("&response=");
nsb.append(recap);
nsb.append("&remoteip=");
nsb.append(request.getRemoteAddr());
.
.
.
}
Our Dev\QA domains are registered with the reCaptcha API keys. I found that 'request.getParameter("g-recaptcha-response")' is returning null on QA/Dev environments but on the localhost it is valid.
Any thoughts/help on the reCaptcha not being work on Dev/QA environments?
Thanks in advance for your help.
YRJ
Solved! Go to Solution.
Views
Replies
Total Likes
Hi YRJ,
Another thing to verify is html
--
Views
Replies
Total Likes
Are you seeing any log messages that explain this. If it works on Dev Environment and not on the others - it looks like there is something in the other environments that are interfering with the functionality.
Views
Replies
Total Likes
No information on log messages Scott! Yeah something is blocking on the Dev/QA environments but i have no clue yet.
Views
Replies
Total Likes
Hi YRJ,
Another thing to verify is html
--
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies