fix: the same-storage check in the new pre-sign
feature
#2860
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried the recent
pre-sign
feature in #2855 , but it does not work for my Aliyun OSS. In particular, I tried this feature with the latest test docker image with Aliyun OSS. I set presign to true and restarted the container several times. However, it seems that it doesn't work out, as the ExternalUrls are not changed after I saw a 'links pre-signed' message in my log.After an examination, I find the debug. In the original code, it checks if the endpoint matches the ExternalLinks's hostname. However, it does not work out in my Aliyun OSS cases, and I return the pre-sign link 'As-Is' to the original one.
My endpoint is
https://oss-cn-shanghai.aliyuncs.com
, while my ExternalLinks's hostname is<bucket-name>.oss-cn-shanghai.aliyuncs.com
. Therefore, they can not match with a simplestrings.Contain()
.What I did:
presign
(feat: pre-signed URL for S3 storage #2855 ) feature is enabled.