Just launched a MODx Revo site (2.1.5-pl) with a SSL cert (https) and noticed that formit (2.0.2 pl) recaptcha was not rendering the images as https, but instead http like so:
http://www.google.com/recaptcha/api/image?c=03AHJ_VuuE3Rl57zNXCservRNwaWnC4fAnOOCssa1fmfKi2jyb-JYb7Jy5evXh3t-DjF_JHXjL-x5cEfWYjv1_CvNe675EawkP99AImkViczv8FvRQBxFxg5XZV_Vva_pdKb-AL_abahFSAAPY3rY02BAHEavWwT_j6Q
I went into components/formit/model/recaptcha/formitrecaptcha.class.php
On line 32 and 33, the following was in the code:
const API_SERVER = '
http://www.google.com/recaptcha/api/';
const API_SECURE_SERVER = '
https://www.google.com/recaptcha/api/';
I re-wrote the first constant to be https:
const API_SERVER = '
https://www.google.com/recaptcha/api/';
const API_SECURE_SERVER = '
https://www.google.com/recaptcha/api/';
I'm assuming there must be some System Configuration I missed in MODx b/c I'm assuming I shouldn't probably need to manually change the code like this. By the way, when I did, the code on the site was properly producing the image as https which fixed the problem.
The challenge with doing this is upgrades since that change will be overwritten or not used anymore (formit already has a new version out which I need to upgrade anyway). Is there a better way to solve this problem?
[ed. note: flinx777 last edited this post 14 years, 8 months ago.]