fix(xo-web): save region on S3 remote creation

Introduced by f755365
This commit is contained in:
Florent Beauchamp 2022-09-30 16:50:48 +02:00 committed by Julien Fontanet
parent ab9428a9c4
commit feaad13ac3
2 changed files with 3 additions and 1 deletions

View File

@ -25,5 +25,6 @@
- xo-remote-parser patch - xo-remote-parser patch
- xo-server-transport-nagios patch - xo-server-transport-nagios patch
- xo-web patch
<!--packages-end--> <!--packages-end-->

View File

@ -143,11 +143,12 @@ export default decorate([
encryptionKey: encryptionKey.trim() !== '' ? encryptionKey : undefined, encryptionKey: encryptionKey.trim() !== '' ? encryptionKey : undefined,
} }
if (type === 's3') { if (type === 's3') {
const { allowUnauthorized, bucket, directory, protocol = 'https' } = state const { allowUnauthorized, bucket, directory, protocol = 'https', region } = state
urlParams.path = bucket + '/' + directory urlParams.path = bucket + '/' + directory
urlParams.allowUnauthorized = allowUnauthorized urlParams.allowUnauthorized = allowUnauthorized
urlParams.protocol = protocol urlParams.protocol = protocol
urlParams.useVhdDirectory = true // always on for s3 urlParams.useVhdDirectory = true // always on for s3
urlParams.region = region
} }
username && (urlParams.username = username) username && (urlParams.username = username)
password && (urlParams.password = password) password && (urlParams.password = password)