Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow proxyKey config setting to be environment variable aware #69

Open
jamesmacwhite opened this issue May 16, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jamesmacwhite
Copy link

jamesmacwhite commented May 16, 2023

Is your feature request related to a problem? Please describe.

The proxy key config setting is currently not environment aware, while this is generally not needed as the key will be the same across all environments it does mean if you want to store the proxyKey value as an environment variable, it will be output in the project config as plain text.

For best practice all keys should not be directly committed to source control and instead use environment variables for security in the event of a code leak or breach.

Currently the proxyKey will be output in plain text.

Describe the solution you'd like

The proxyKey config value to be environment aware so the value can be stored as:

<?php

return [
    'proxyKey' => '$INSTAGRAM_FEED_PROXY_KEY'
];

Currently to use an environment variable, the value needs to be parsed first, which then outputs in clear text within project config.

<?php

use craft\helpers\App;

return [
	'proxyKey' => App::env('INSTAGRAM_FEED_PROXY_KEY'),
];
@jamesmacwhite jamesmacwhite added the enhancement New feature or request label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant