Closed Prometee closed 3 years ago
That makes sense. How about adding a host
parameter and inject it into all services?
karser_recaptcha3:
host: 'www.google.com'
# host: 'www.recaptcha.net'
P.S. the title of this issue is awesome :)
@karser I agree host
is better.
Let start a PR 😉 !
@karser I'm wondering if the $siteVerifyUrl
argument of ReCaptcha\RequestMethod\CurlPost
class has to be updated too because, it will be required only if your server is hosted in China.
The modified verify url is responding to a GET request (to test it) : https://www.recaptcha.net/recaptcha/api/siteverify
We use your bundle on our shop through a plugin
prometee/sylius-google-recaptcha-v3-plugin
without any issue.Except when Chinese people try to fill a form (with a GRecaptchaV3 embeded) from China, apparently this is a known issue and google assistance page is telling us to replace
google.com
byrecaptcha.net
. You can find more info about this reading the StackOverflow answer here : https://stackoverflow.com/questions/57827914/google-recaptcha-in-chinaOne way to fix this is to simply extends the template, but may I suggest to be able to switch this from a config switch ?
(A comment can be also linked to this config field with the link to the StackOverflow page)
And then add a third constructor argument to the
Recaptcha3Type
to allow the twig template to switch domain accordingly.Any suggestion or advise before I start to propose a PR ?