mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-09 05:18:47 +00:00
Add support for ReCaptcha in addition to HCaptcha (#372)
* Bump YamlDotNet from 11.2.1 to 12.0.0 Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 11.2.1 to 12.0.0. - [Release notes](https://github.com/aaubry/YamlDotNet/releases) - [Commits](https://github.com/aaubry/YamlDotNet/compare/v11.2.1...v12.0.0) --- updated-dependencies: - dependency-name: YamlDotNet dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Add support for ReCaptcha in addition to HCaptcha Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
2391eb14d0
commit
9c5c5b5798
5 changed files with 57 additions and 13 deletions
|
@ -1,6 +1,17 @@
|
|||
@using LBPUnion.ProjectLighthouse.Configuration
|
||||
@if (ServerConfiguration.Instance.Captcha.CaptchaEnabled)
|
||||
{
|
||||
<div class="h-captcha" data-sitekey="@ServerConfiguration.Instance.Captcha.SiteKey"></div>
|
||||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
|
||||
@switch (ServerConfiguration.Instance.Captcha.Type)
|
||||
{
|
||||
case CaptchaType.HCaptcha:
|
||||
<div class="h-captcha" data-sitekey="@ServerConfiguration.Instance.Captcha.SiteKey"></div>
|
||||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
|
||||
break;
|
||||
case CaptchaType.ReCaptcha:
|
||||
<div class="g-recaptcha" data-sitekey="@ServerConfiguration.Instance.Captcha.SiteKey"></div>
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue