comments icon indicating copy to clipboard operation
comments copied to clipboard

Use parseEnv on reCAPTCHA key fields in settings

Open danbrellis opened this issue 3 years ago • 1 comments

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.

danbrellis avatar Jul 29 '22 19:07 danbrellis

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 avatar Jul 29 '22 23:07 engram-design

Added in 1.9.4

engram-design avatar Sep 17 '22 02:09 engram-design