Adding RecaptchaApiSource to RecaptchaConfiguration. #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With these changes, one may optionally add RecaptchaApiSource to Web.config to override the default url used to fetch google's reCAPTCHA resources:
By using the above, the package will use https://www.recaptcha.net/recaptcha/api.js and https://www.recaptcha.net/recaptcha/api/siteverify rather than https://www.google.com/recaptcha/api.js and https://www.google.com/recaptcha/api/siteverify
If RecaptchaApiSource is not specified, the default is www.google.com/recaptcha.
These changes are required to allow access to users who are unable to request resources from google.com domains, as is the case for many users in China. By editing one's host file ("C:\Windows\System32\drivers\etc\hosts") to include the following, it can be tested that the reCAPTCHA widget with RecaptchaApiSource overridden works without access to google.com:
127.0.0.1 google.com www.google.com