Currently only the default route on app start loads for my app in cloudfront. It works when I go to root of site using cloudfront.[address].net
I'm also using WAF to limit it to only my IP address, but when I go to cloudfront.[address].net/signup or /login then I get
How can I get the child routes to work too? I have my bucket policy
Bucket Policy
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "3",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2SRF18SRG0FC7"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::[bucket]/*"
}
]
}
I'm blocking all public access, but I'm also using cloudfront with an OAI so I don't think I need to worry about it being blocked since it's going through cloudfront.
I appreciate any help!
You need to set the cloudfront distribution's error document to your entry document(index.html)
Please ensure you have the following steps covered.
/index.html
for HTTP 404
and 403
error codes deployed
state, because cloudfront may take longer and we could easily make an observational error Hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.