mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-03-13 08:28:13 -04:00
🐛 Fix: fix custom domain error of minio
This commit is contained in:
parent
95faa5b247
commit
0c8ea832aa
@ -2094,13 +2094,18 @@ async function initCustomDomainList () {
|
||||
} else {
|
||||
if (manageStore.config.picBed[configMap.alias].endpoint) {
|
||||
const endpoint = manageStore.config.picBed[configMap.alias].endpoint
|
||||
const s3ForcePathStyle = manageStore.config.picBed[configMap.alias].s3ForcePathStyle
|
||||
let url
|
||||
if (/^https?:\/\//.test(endpoint)) {
|
||||
url = new URL(endpoint)
|
||||
} else {
|
||||
url = new URL(manageStore.config.picBed[configMap.alias].sslEnabled ? 'https://' + endpoint : 'http://' + endpoint)
|
||||
url = new URL(manageStore.config.picBed[configMap.alias].sslEnabled ? `https://${endpoint}` : `http://${endpoint}`)
|
||||
}
|
||||
if (s3ForcePathStyle) {
|
||||
currentCustomDomain.value = `${url.protocol}//${url.hostname}${url.port ? ':' + url.port : ''}/${configMap.bucketName}`
|
||||
} else {
|
||||
currentCustomDomain.value = `${url.protocol}//${configMap.bucketName}.${url.hostname}${url.port ? ':' + url.port : ''}`
|
||||
}
|
||||
currentCustomDomain.value = `${url.protocol}//${configMap.bucketName}.${url.hostname}`
|
||||
} else {
|
||||
currentCustomDomain.value = `https://${configMap.bucketName}.s3.amazonaws.com`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user