This project is read-only.

HTTPS?

Mar 11, 2013 at 2:18 PM
Edited Mar 11, 2013 at 2:21 PM
Is there a way to force the control to use HTTPS?
Jul 25, 2013 at 5:30 PM
Edited Jul 25, 2013 at 5:42 PM
I'm having an issue with this, too. Our code was failing in production, so as a hack we changed:
@Html.Recaptcha(theme: RecaptchaTheme.Clean)
To:
@Html.Raw(Html.Recaptcha(theme: RecaptchaTheme.Clean).ToHtmlString().Replace("http","https"))

It feels very kludgy. The method which creates the script to insert should use the same protocol being used by the rest of the page. The browser doesn't like making a non-secure (http) javascript call in a secure (https) page.

EDIT: Issue 1155 addresses this, and patch 14651 looks like it fixes it, so when it gets into the stable release code we should be all set. This workaround works for now.

EDIT 2: Actually I now see 3 patches that all address this issue. When can we get one of those in the stable version?
Aug 2, 2014 at 3:03 PM
The library now automatically uses HTTPS for calling Google recaptcha APIs if the page that recpatcha control of the library also uses HTTPS.
Marked as answer by tanveery on 8/2/2014 at 7:03 AM
Aug 6, 2014 at 12:48 PM
Edited Aug 6, 2014 at 4:47 PM
I also had this problem. our application is proxied through nginx and does not work https.

in version 1.6 the problem is here:


this.UseSsl = HttpContext.Current.Request.Url.AbsoluteUri.StartsWith ("https");


the fact that nginx drawn to the site locally via http. and in the world of proxies via https.

solution we see: is to check the request headers to identify the original address.

or add (in web.config or function) option that would allow explicitly ispolzovat http or https

or use https all time