verbb / comments

A Craft CMS plugin for managing comments directly within the CMS.
Other
137 stars 33 forks source link

Use parseEnv on reCAPTCHA key fields in settings #254

Closed danbrellis closed 1 year ago

danbrellis commented 1 year ago

What are you trying to do?

To enter in the reCAPTCHA site and secret keys via the control panel one would have to enter in the value which is stored in config/project/project.yaml and subsequently committed.

These fields should allow users to enter in an ENV variable, similar to how Craft allows in settings/email.

What's your proposed solution?

Enable craft\helpers\App::parseEnv() on the two reCAPTCHA fields to allow env vars to be entered via the control panel.

Additional context

See https://craftcms.com/docs/3.x/extend/environmental-settings.html

The work-around is to override this setting with the use of config/comments.php.

engram-design commented 1 year ago

Also added the ability to set these as .env variables. To get this early, change your verbb/comments requirement in composer.json to:

"require": {
  "verbb/comments": "dev-craft-3 as 1.9.3",
  "...": "..."
}

Then run composer update.

engram-design commented 1 year ago

Added in 1.9.4