iMi-digital / magento2-friendly-captcha

Magento 2 Module to add the Friendly Captcha service to certain forms.
Other
15 stars 12 forks source link

Use EU URL for Site Verify #19

Closed sprankhub closed 1 year ago

sprankhub commented 1 year ago

Currently, the siteverify call is done with a static URL:

https://github.com/iMi-digital/magento2-friendly-captcha/blob/390adb5c15881738de8e6f258db3db2d3fb30b8b/Model/Validate.php#L81

According to https://docs.friendlycaptcha.com/#/eu_endpoint, it is also possible to use the EU URL for the siteverify call. Hence, I think we should use the EU URL if imi_friendly_captcha/general/eu_endpoint is enabled.

amenk commented 1 year ago

yes, but see also https://github.com/iMi-digital/magento2-friendly-captcha/issues/11

We want to make the URLs fully configurable to also support other alternative servers, so we would need two string fields for widget and API URL. Or an additional option "custom URLs2.

We can introduce this a a breaking change and / or migrate configuration.

Are you interested to make a pull request? Otherwise we would probably tackle this, but it will take some time.

sprankhub commented 1 year ago

Yeah, I saw that...

For now, I would only make a PR for a simple "if EU endpoint is enabled, use EU URL for site verify" feature. This is already better than nothing IMHO. Right?

If you want to extend this even further in the future, fine for me. However, I do not have a use case for this now.

amenk commented 1 year ago

Ok fine with me, go ahead