mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[feature] Change azure connection string; For bug 73502
This commit is contained in:
committed by
Sergey Konovalov
parent
54e7c2041c
commit
765c2d7597
@ -26,11 +26,14 @@ function getBlobServiceClient(storageCfg) {
|
||||
storageCfg.accessKeyId,
|
||||
storageCfg.secretAccessKey
|
||||
);
|
||||
const endpointUrl = new URL(storageCfg.endpoint.replace(/\/+$/, ''));
|
||||
blobServiceClients[configKey] = new BlobServiceClient(
|
||||
`${endpointUrl.protocol}//${storageCfg.accessKeyId}.${endpointUrl.host}`,
|
||||
credential
|
||||
);
|
||||
if (storageCfg.endpoint.includes(storageCfg.accessKeyId)) {
|
||||
blobServiceClients[configKey] = new BlobServiceClient(storageCfg.endpoint, credential);
|
||||
} else {
|
||||
const endpointUrl = new URL(storageCfg.endpoint.replace(/\/+$/, ''));
|
||||
blobServiceClients[configKey] = new BlobServiceClient(
|
||||
`${endpointUrl.protocol}//${storageCfg.accessKeyId}.${endpointUrl.host}`,
|
||||
credential);
|
||||
}
|
||||
}
|
||||
return blobServiceClients[configKey];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user