Created
September 8, 2021 09:49
-
-
Save velotiotech/82d5396ab375105c34b4c663ce6eafcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUBLIC_URL=https://{your-static-bucket-name}.s3.{aws_region}.amazonaws.com/ npm run build | |
//Bucket Policy | |
{ | |
"Version": "2012-10-17", | |
"Id": "http referer from your domain only", | |
"Statement": [ | |
{ | |
"Sid": "Allow get requests originating from", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::{your-static-bucket-name}/static/*", | |
"Condition": { | |
"StringLike": { | |
"aws:Referer": [ | |
"https://your-app-domain-name" | |
] | |
} | |
} | |
} | |
] | |
} | |
//CORS | |
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"GET" | |
], | |
"AllowedOrigins": [ | |
"https://your-app-domain-name" | |
], | |
"ExposeHeaders": [] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment