oposs/silverstripe-hcaptcha
Composer 安装命令:
composer require oposs/silverstripe-hcaptcha
包简介
Protect your forms with hCaptcha
README 文档
README
Protect your forms with hCaptcha, a GDPR, CCPA, LGPD, PIPL and more compliant spam prodection (according their website)
Installation
Note: This version of the module is compatible with Silverstripe CMS 5.x. For Silverstripe 4.x compatibility, please use an earlier version/tag.
Make sure you met the following requirements beforehand:
- SilverStripe 5.x
- SilverStripe Spam Protection 4.x
- PHP 8.1+
- PHP CURL and JSON extensions
composer require oposs/silverstripe-hcaptcha
And set hCaptcha as your default spamprotector:
# app/_config/spamprotection.yml SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension: default_spam_protector: Oposs\hCaptcha\hCaptchaProtector
Configuration
In your app/_config/hcaptcha.yml
Oposs\hCaptcha\Forms\hCaptchaField: site_key: 'your_site_key' # Make sure to set the key starting with 0x.. in quotes secret_key: 'your_secret_key' # To configure options listed here https://docs.hcaptcha.com/configuration api_configuration: recaptchacompat: 'off'
For more configuration options check comments in hCaptchaField.php
Usage
In php:
use Oposs\hCaptcha\hCaptchaProtector\Forms new hCaptchaField('SpamProtection', 'SpamProtection', null);
Or if you use Userforms:
Troubleshooting
Q: Users are redirected to the main page when the captcha is incorrect or not solved
A: This is most likely a redirecting problem, if your site is running behind a proxy have a look at
the Director's alternate_base_url property (albeit heavily used, not document yet...)
Contributions are welcome :)
oposs/silverstripe-hcaptcha 适用场景与选型建议
oposs/silverstripe-hcaptcha 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.25k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 02 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「captcha」 「silverstripe」 「spamprotection」 「hcaptcha」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oposs/silverstripe-hcaptcha 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oposs/silverstripe-hcaptcha 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oposs/silverstripe-hcaptcha 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Spam protection using a honeypot field for the Neos form builder
Recaptcha V3 verification for Silverstripe framework, including a form field, spam protector and verification support
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
Two Captcha
Analytics chooser extensions for site settings.
统计信息
- 总下载量: 1.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-25
