0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/discourse-hcaptcha
David Taylor b447f12556
DEV: Block external requests in system specs via Chrome DNS resolver (#40685)
Add a catch-all `MAP * ~NOTFOUND` to Chrome's --host-resolver-rules so
any non-excluded host fails to resolve, instead of system specs reaching
the real internet. Local/test hosts (the Capybara server, *.localhost,
MinIO) are excluded. Unlike Playwright request interception this leaves
the browser HTTP cache enabled.

Specs that need an external host opt in with `allow_network:
["example.com"]`, which runs them in a dedicated browser with those
hosts excluded from the block.
2026-06-17 12:29:57 +01:00
..
app FEATURE: Add recaptcha provider to hcaptcha plugin (#39018) 2026-06-09 09:08:26 -05:00
assets FEATURE: Add recaptcha provider to hcaptcha plugin (#39018) 2026-06-09 09:08:26 -05:00
config I18N: Update translations (#40823) 2026-06-12 16:19:35 +02:00
db FEATURE: Add recaptcha provider to hcaptcha plugin (#39018) 2026-06-09 09:08:26 -05:00
lib/discourse_hcaptcha FEATURE: Add recaptcha provider to hcaptcha plugin (#39018) 2026-06-09 09:08:26 -05:00
spec DEV: Block external requests in system specs via Chrome DNS resolver (#40685) 2026-06-17 12:29:57 +01:00
test/javascripts
package.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
plugin.rb FEATURE: Add recaptcha provider to hcaptcha plugin (#39018) 2026-06-09 09:08:26 -05:00
README.md
tsconfig.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00

Discourse hCaptcha Plugin

Overview

This plugin is designed to integrate HCaptcha into the sign-up form of Discourse forums. This plugin aims to enhance security and bot protection by leveraging the privacy-centric features of HCaptcha. The setup process is straightforward and consists of a few easy steps.

Installation

  1. Create an HCaptcha Account:

    • Visit HCaptcha to create an account. After registering, you'll receive a site key and a secret key.
  2. Setup Local Testing (Optional):

    • If you are testing locally, add a new virtual host entry to your hosts file. Include a line like 127.0.0.1 test.mydomain.com. Make sure the domain is valid, even if you don't own it, to ensure the HCaptcha script loads properly.
  3. Configure Plugin Settings:

    • Log into your Discourse admin panel.
    • Navigate to Admin > Settings > Plugins > hCaptcha (settings).
    • In this section, add the site key and secret key you obtained from HCaptcha.

By completing these steps, you will successfully integrate HCaptcha into the sign-up form of your community.