Added conditional for recaptchaAPIEndpoint to handle different environments.