Improved handling of origins and lambda triggers#19
Improved handling of origins and lambda triggers#19gehan wants to merge 4 commits intoserverless-components:masterfrom
Conversation
* Handle s3 website urls properly * Allow multiple origins from same s3 bucket * Allow settings of original protocol polic
|
+1 |
1 similar comment
|
+1 |
danielcondemarin
left a comment
There was a problem hiding this comment.
LGTM aside from just a few things as per my comments 🚀
It also doesn't seem like the change would be breaking, could you confirm?
|
Will update. Changes should not break anything but will confirm. |
|
Wonderful PR, I also encountered with exactly same issue like @gehan Can you please 🙏 confirm that changes should not break anything so that @danielcondemarin can take this further 🚀 |
What config are you using to get this error? I'll update accordingly! |
Hi, @gehan I think you already fix the issue in this PR. Actually, I have 2 origins with the same domain but with different paths like this configuration. {
"defaults": {...},
"origins": [
{
"url": "http://xxx-pwa-prod.s3.amazonaws.com",
"private": true,
"pathPatterns": {
"_next/*": {
"ttl": 86400
},
"static/*": {
"ttl": 86400
}
}
},
{
"url": "http://xxx-pwa-prod.s3.amazonaws.com/_next/static",
"private": true,
"pathPatterns": {
"service-worker.js": {
"ttl": 0
}
}
}
]
}and its end-up with same {
"Quantity": 2,
"Items": [
{
"Id": "xxx-pwa-prod",
"DomainName": "xxx-pwa-prod.s3.amazonaws.com",
"CustomHeaders": {
"Quantity": 0,
"Items": []
},
"OriginPath": "",
"S3OriginConfig": {
"OriginAccessIdentity": "origin-access-identity/cloudfront/<identity>"
}
},
{
"Id": "xxx-pwa-prod",
"DomainName": "xxx-pwa-prod.s3.amazonaws.com",
"CustomHeaders": {
"Quantity": 0,
"Items": []
},
"OriginPath": "/_next/static",
"S3OriginConfig": {
"OriginAccessIdentity": "origin-access-identity/cloudfront/<identity>"
}
}
]
} |
|
@krish-dev oh yes sorry I see! misunderstood. i'll check my PR for breaking changes 👍 |
|
@gehan @danielcondemarin any update on the same. |
|
Any update on this? |
Long delay here! Updated as per comments and is non-breaking |
Related to #18