You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of s3-ambient origin strategy will match the provided origin purely via regex. However, there are multiple different s3 path formats that are valid. e.g.
https://{bucket}.s3-{region-code}.amazonaws.com/{key} - legacy virtual-hosted-style (some older regions only)
https://{bucket}.s3.amazonaws.com/{key} - legacy global (us-east-1 only)
s3://{bucket}/{key} - s3 URI
We might not want to support all of these but it would be good to be able to identify that different formats of S3 URIs are actually pointing at the same file. Sometimes it can be confusing to identify which format a particular s3-ambient origin strategy is using as it can affect whether the incoming request is treated as S3 ambient or not.
RegionalisedObjectInBucket class has parsing logic for different formats. There are also helper methods to generate https:// and s3:// URIs from an ObjectInBucket.
Also need to bear in mind that a https:// URI that points at an s3 bucket could be serving an open object over http.
Would we want to support s3:// URIs?
The text was updated successfully, but these errors were encountered:
The current implementation of s3-ambient origin strategy will match the provided origin purely via regex. However, there are multiple different s3 path formats that are valid. e.g.
https://s3.{region-code}.amazonaws.com/{bucket}/{key}
- path-stylehttps://s3.amazonaws.com/{bucket}/{key}
- legacy path-style (us-east-1 only)https://{bucket}.s3.{region-code}.amazonaws.com/{key}
- virtual-hosted-stylehttps://{bucket}.s3-{region-code}.amazonaws.com/{key}
- legacy virtual-hosted-style (some older regions only)https://{bucket}.s3.amazonaws.com/{key}
- legacy global (us-east-1 only)s3://{bucket}/{key}
- s3 URIWe might not want to support all of these but it would be good to be able to identify that different formats of S3 URIs are actually pointing at the same file. Sometimes it can be confusing to identify which format a particular s3-ambient origin strategy is using as it can affect whether the incoming request is treated as S3 ambient or not.
RegionalisedObjectInBucket
class has parsing logic for different formats. There are also helper methods to generatehttps://
ands3://
URIs from anObjectInBucket
.Also need to bear in mind that a
https://
URI that points at an s3 bucket could be serving an open object over http.Would we want to support
s3://
URIs?The text was updated successfully, but these errors were encountered: