新增支持s3协议对象存储
This commit is contained in:
20
mail-worker/src/utils/domain-uitls.js
Normal file
20
mail-worker/src/utils/domain-uitls.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const domainUtils = {
|
||||
toOssDomain(domain) {
|
||||
|
||||
if (!domain) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (!domain.startsWith('http')) {
|
||||
return 'https://' + domain
|
||||
}
|
||||
|
||||
if (domain.endsWith("/")) {
|
||||
domain = domain.slice(0, -1);
|
||||
}
|
||||
|
||||
return domain
|
||||
}
|
||||
}
|
||||
|
||||
export default domainUtils
|
||||
Reference in New Issue
Block a user