Skip to content

Commit

Permalink
enforce usage of uploadUrls (transloadit#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Aug 10, 2022
1 parent 36bc872 commit c5e04aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config/companion.js
Expand Up @@ -99,7 +99,8 @@ const validateConfig = (companionOptions) => {
}

if (companionOptions.uploadUrls == null || companionOptions.uploadUrls.length === 0) {
logger.warn('Running without uploadUrls specified is a security risk if running in production', 'startup.uploadUrls')
if (process.env.NODE_ENV === 'production') throw new Error('uploadUrls is required')
logger.error('Running without uploadUrls is a security risk and Companion will refuse to start up when running in production (NODE_ENV=production)', 'startup.uploadUrls')
}

if (periodicPingUrls != null && (
Expand Down

0 comments on commit c5e04aa

Please sign in to comment.