1
0
Fork 0
mirror of synced 2024-06-28 11:00:55 +12:00

Quick fixes.

This commit is contained in:
mike12345567 2020-12-18 16:48:14 +00:00
parent cce92f5ab3
commit 5444af9400
2 changed files with 10 additions and 8 deletions

View file

@ -4,7 +4,7 @@ COUCH_DB_PASSWORD=budibase
COUCH_DB_USER=budibase
WORKER_API_KEY=budibase
BUDIBASE_ENVIRONMENT=PRODUCTION
HOSTING_URL="http://localhost"
HOSTING_URL=http://localhost
LOGO_URL=https://logoipsum.com/logo/logo-15.svg
APP_PORT=4002
WORKER_PORT=4003

View file

@ -55,12 +55,6 @@ async function getMinioSession() {
Bucket: APP_BUCKET,
})
.promise()
await objClient
.putBucketPolicy({
Bucket: APP_BUCKET,
Policy: JSON.stringify(PUBLIC_READ_POLICY),
})
.promise()
} catch (err) {
// bucket doesn't exist create it
if (err.statusCode === 404) {
@ -69,7 +63,15 @@ async function getMinioSession() {
Bucket: APP_BUCKET,
})
.promise()
} else {
} else if (err.statusCode === 403) {
await objClient
.putBucketPolicy({
Bucket: APP_BUCKET,
Policy: JSON.stringify(PUBLIC_READ_POLICY),
})
.promise()
}
else {
throw err
}
}