Skip to content

Allow proxyKey config setting to be environment variable aware #69

@jamesmacwhite

Description

@jamesmacwhite

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'),
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions