2 個答案
- 最新
- 最多得票
- 最多評論
1
You can try something like this-
const distri = new cloudfront.Distribution(this, 'myDist', { defaultBehavior: { origin: new origins.S3Origin(bucketA) }, additionalBehaviors: { '/image/' :{ origin: new origins.S3Origin(bucketB) } } // path image should got to origin bucketB });
more samples on Distribution API here-
https://docs.aws.amazon.com/cdk/api/v1/docs/aws-cloudfront-readme.html#multiple-behaviors--origins
hope this helps.
已回答 2 年前
1
That works! I was reading the { [string]: BehaviorOptions }
from the docs as some string list what was causing my confusion
已回答 2 年前
相關內容
- 已提問 10 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前