mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-03-13 00:18: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 {
|
} else {
|
||||||
if (manageStore.config.picBed[configMap.alias].endpoint) {
|
if (manageStore.config.picBed[configMap.alias].endpoint) {
|
||||||
const endpoint = manageStore.config.picBed[configMap.alias].endpoint
|
const endpoint = manageStore.config.picBed[configMap.alias].endpoint
|
||||||
|
const s3ForcePathStyle = manageStore.config.picBed[configMap.alias].s3ForcePathStyle
|
||||||
let url
|
let url
|
||||||
if (/^https?:\/\//.test(endpoint)) {
|
if (/^https?:\/\//.test(endpoint)) {
|
||||||
url = new URL(endpoint)
|
url = new URL(endpoint)
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
currentCustomDomain.value = `https://${configMap.bucketName}.s3.amazonaws.com`
|
currentCustomDomain.value = `https://${configMap.bucketName}.s3.amazonaws.com`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user