Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.
Merged
Changes from all commits
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
25 changes: 16 additions & 9 deletions packages/server-core/src/media/storageprovider/s3.storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,22 @@ export class S3Provider implements StorageProviderInterface {
let routeRegex = ''
for (let route of routes)
if (route !== '/')
routeRegex +=
route === '/location' ||
route === '/auth' ||
route === '/admin' ||
route === '/editor' ||
route === '/studio' ||
route === '/capture'
? `^${route}/|`
: `^${route}|`
switch (route) {
case '/admin':
case '/editor':
case '/studio':
routeRegex += `^${route}$$|` // String.replace will convert this to a single $
routeRegex += `^${route}/|`
break
case '/location':
case '/auth':
case '/capture':
routeRegex += `^${route}/|`
break
default:
routeRegex += `^${route}$$|` // String.replace will convert this to a single $
break
}
if (routes.length > 0) routeRegex = routeRegex.slice(0, routeRegex.length - 1)
let publicRegex = ''
fs.readdirSync(path.join(appRootPath.path, 'packages', 'client', 'dist'), { withFileTypes: true }).forEach(
Expand Down