master.php with environment variables
-
We have a containerized setup, using docker, and we need a way to pass our CDN’s secrets (ID, key, etc.) via environment variables to master.php, so that only our production environment will have the caching enabled.
Basically, I need to be able to set the credentials like this:
“cdn.cf2.key”: “‘$ENV[‘CF2KEY’]'”,
“cdn.cf2.secret”: “‘$ENV[‘CF2SECRET’]'”,
“cdn.cf2.id”: “‘$ENV[‘CF2ID’]'”,It seems that in the past, master.php was just a
return array(), however now it begins with<?php exit; ?>followed by an array, which I assume it’s causing W3TC to overwrite the file each time the container is started.Is there any way to get this behavior without major edits on the plugin itself?
The topic ‘master.php with environment variables’ is closed to new replies.