Skip to content

Commit 953ad68

Browse files
committed
s3 cors rules
1 parent 683c1fd commit 953ad68

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

cloudformation/lambda.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,28 @@ Resources:
339339
Properties:
340340
BucketName: !Sub "${ResumeS3BucketName}-${RunEnvironment}"
341341
CorsConfiguration:
342-
CorsRules:
343-
- AllowedHeaders:
344-
- '*'
345-
AllowedOrigins:
346-
- '*'
347-
AllowedMethods:
348-
- GET
349-
- PUT
350-
Id: CORSAllowAll
351-
MaxAge: 3600
342+
!If
343+
- IsProd
344+
- CorsRules:
345+
- AllowedHeaders:
346+
- '*'
347+
AllowedOrigins:
348+
- 'https://resumes.acm.illinois.edu'
349+
AllowedMethods:
350+
- GET
351+
- PUT
352+
Id: CORSAllowProdSite
353+
MaxAge: 3600
354+
- CorsRules:
355+
- AllowedHeaders:
356+
- '*'
357+
AllowedOrigins:
358+
- 'http://localhost:5173'
359+
AllowedMethods:
360+
- GET
361+
- PUT
362+
Id: CORSAllowLocalhost
363+
MaxAge: 3600
352364

353365
Outputs:
354366
ApiUrl:

0 commit comments

Comments
 (0)