feat: add S3 SSL as an env variable (#188)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
parent
4cb92a7257
commit
3cb08c73d3
5 changed files with 6 additions and 1 deletions
|
@ -23,6 +23,7 @@ DATASOURCE_S3_BUCKET=bucket
|
|||
DATASOURCE_S3_ENDPOINT=s3.amazonaws.com
|
||||
DATASOURCE_S3_REGION=us-west-2
|
||||
DATASOURCE_S3_FORCE_S3_PATH=false
|
||||
DATASOURCE_S3_USE_SSL=false
|
||||
|
||||
# or you can use swift
|
||||
DATASOURCE_TYPE=swift
|
||||
|
|
|
@ -27,6 +27,7 @@ export interface ConfigS3Datasource {
|
|||
endpoint?: string;
|
||||
bucket: string;
|
||||
force_s3_path: boolean;
|
||||
use_ssl: boolean;
|
||||
region?: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ export default function readConfig() {
|
|||
map('DATASOURCE_S3_BUCKET', 'string', 'datasource.s3.bucket'),
|
||||
map('DATASOURCE_S3_FORCE_S3_PATH', 'boolean', 'datasource.s3.force_s3_path'),
|
||||
map('DATASOURCE_S3_REGION', 'string', 'datasource.s3.region'),
|
||||
map('DATASOURCE_S3_USE_SSL', 'boolean', 'datasource.s3.use_ssl'),
|
||||
|
||||
|
||||
map('DATASOURCE_SWIFT_USERNAME', 'string', 'datasource.swift.username'),
|
||||
map('DATASOURCE_SWIFT_PASSWORD', 'string', 'datasource.swift.password'),
|
||||
|
|
|
@ -37,6 +37,7 @@ const validator = object({
|
|||
bucket: string(),
|
||||
force_s3_path: boolean().default(false),
|
||||
region: string().default('us-east-1'),
|
||||
use_ssl: boolean().default(false),
|
||||
}).nullable().notRequired(),
|
||||
swift: object({
|
||||
username: string(),
|
||||
|
|
|
@ -17,7 +17,7 @@ export class S3 extends Datasource {
|
|||
secretKey: config.secret_access_key,
|
||||
pathStyle: config.force_s3_path,
|
||||
port: 9000,
|
||||
useSSL: false,
|
||||
useSSL: config.use_ssl,
|
||||
region: config.region,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue