Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit 5d55439

Browse files
committed
Add S3 bucket to CSP
Signed-off-by: Peter Baker <peter.baker122@csiro.au>
1 parent 20a5194 commit 5d55439

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/infra/infra.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,13 @@ export class ReefguideWebApiStack extends cdk.Stack {
153153
hz: hz,
154154
// This overrides CSP to allow the browser to use these endpoints
155155
// App may generate blob object URLs.
156-
cspEntries: [reefGuideApi.endpoint, webAPI.endpoint, 'blob:'].concat(
157-
ARC_GIS_ENDPOINTS,
158-
),
156+
cspEntries: [
157+
// S3 bucket downloads within this region
158+
`https://*.s3.${cdk.Stack.of(this).region}.amazonaws.com`,
159+
reefGuideApi.endpoint,
160+
webAPI.endpoint,
161+
'blob:',
162+
].concat(ARC_GIS_ENDPOINTS),
159163
});
160164

161165
const jobSystem = new JobSystem(this, 'job-system', {

0 commit comments

Comments
 (0)