Skip to content

Commit

Permalink
crash if trying to set path to /
Browse files Browse the repository at this point in the history
fixes #4271
  • Loading branch information
mifi committed Mar 17, 2024
1 parent 7f73a5c commit 19400c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/@uppy/companion/src/config/companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ const validateConfig = (companionOptions) => {
)
}

const { providerOptions, periodicPingUrls } = companionOptions
const { providerOptions, periodicPingUrls, server } = companionOptions

if (server && server.path) {
// see https://github.com/transloadit/uppy/issues/4271
if (server.path === '/') throw new Error('server.path cannot be set to /')
}

if (providerOptions) {
const deprecatedOptions = { microsoft: 'providerOptions.onedrive', google: 'providerOptions.drive', s3: 's3' }
Expand Down

0 comments on commit 19400c3

Please sign in to comment.