Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/server_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ function getStartup (req, res) {
* @returns {string} the input with real variable content
*/
function replaceSecretPlaceholder (input) {
if (global.config.cors === "allowWhitelist") {
if (global.config.cors !== "allowAll") {
return input.replaceAll(/\*\*(SECRET_[^*]+)\*\*/g, (match, group) => {
return process.env[group];
});
} else {
Log.error("Replacing secrets works only with CORS and `allowWhitelist`, you need to set this in `config.js`, set `cors: allowWhitelist`");
Log.error("Replacing secrets doesn't work with CORS `allowAll`, you need to set `cors` to `disabled` or `allowWhitelist` in `config.js`");
Comment thread
khassel marked this conversation as resolved.
Outdated
return input;
}
}
Expand Down
Loading