Skip to content

Commit

Permalink
🐛 headless deployments need to stay public
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Feb 25, 2024
1 parent e407451 commit c2ebbdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ export default class Deploy extends Command {
'dist',
dp.deployment.s3.headless,
'SYNC_FILES',
'',
true,
true,
),
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/lib/deploytasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ exports.handler = async (event, context) => {
})
}

async sync(task: ListrTaskWrapper<any, any> | null, folder: string, bucket: string, status: string, prefix = '', deleteRemoved = true) {
async sync(task: ListrTaskWrapper<any, any> | null, folder: string, bucket: string, status: string, prefix = '', deleteRemoved = true, IsHeadless = false) {
await this.deployment.update(status)
const sts = await this.deployment.sts()
const client = require('@auth0/s3').createClient({s3Client: new S3(sts)})
Expand All @@ -547,7 +547,7 @@ exports.handler = async (event, context) => {
deleteRemoved: deleteRemoved,
s3Params: {
Bucket: bucket,
ACL: 'private',
ACL: IsHeadless ? 'publc-read' : 'private',
Prefix: prefix,
},
})
Expand Down

0 comments on commit c2ebbdf

Please sign in to comment.