mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-29 23:50:18 +01:00
Update cmd.go
added EnvVar to all flags
This commit is contained in:
parent
28614c991d
commit
45e0967a37
1 changed files with 27 additions and 1 deletions
28
cmd/cmd.go
28
cmd/cmd.go
|
@ -37,6 +37,7 @@ var globalFlags = []cli.Flag{
|
||||||
Name: "listener",
|
Name: "listener",
|
||||||
Usage: "127.0.0.1:8080",
|
Usage: "127.0.0.1:8080",
|
||||||
Value: "127.0.0.1:8080",
|
Value: "127.0.0.1:8080",
|
||||||
|
EnvVar: "LISTENER",
|
||||||
},
|
},
|
||||||
// redirect to https?
|
// redirect to https?
|
||||||
// hostnames
|
// hostnames
|
||||||
|
@ -44,57 +45,69 @@ var globalFlags = []cli.Flag{
|
||||||
Name: "profile-listener",
|
Name: "profile-listener",
|
||||||
Usage: "127.0.0.1:6060",
|
Usage: "127.0.0.1:6060",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "PROFILE_LISTENER",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "force-https",
|
Name: "force-https",
|
||||||
Usage: "",
|
Usage: "",
|
||||||
|
EnvVar: "FORCE_HTTPS",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tls-listener",
|
Name: "tls-listener",
|
||||||
Usage: "127.0.0.1:8443",
|
Usage: "127.0.0.1:8443",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "TLS_LISTENER",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "tls-listener-only",
|
Name: "tls-listener-only",
|
||||||
Usage: "",
|
Usage: "",
|
||||||
|
EnvVar: "TLS_LISTENER_ONLY",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tls-cert-file",
|
Name: "tls-cert-file",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "TLS_CERT_FILE",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tls-private-key",
|
Name: "tls-private-key",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "TLS_PRIVATE_KEY",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "temp-path",
|
Name: "temp-path",
|
||||||
Usage: "path to temp files",
|
Usage: "path to temp files",
|
||||||
Value: os.TempDir(),
|
Value: os.TempDir(),
|
||||||
|
EnvVar: "TEMP_PATH",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "web-path",
|
Name: "web-path",
|
||||||
Usage: "path to static web files",
|
Usage: "path to static web files",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "WEB_PATH",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "proxy-path",
|
Name: "proxy-path",
|
||||||
Usage: "path prefix when service is run behind a proxy",
|
Usage: "path prefix when service is run behind a proxy",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "PROXY_PATH",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "ga-key",
|
Name: "ga-key",
|
||||||
Usage: "key for google analytics (front end)",
|
Usage: "key for google analytics (front end)",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "GA_KEY",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "uservoice-key",
|
Name: "uservoice-key",
|
||||||
Usage: "key for user voice (front end)",
|
Usage: "key for user voice (front end)",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "USERVOICE_KEY",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "provider",
|
Name: "provider",
|
||||||
Usage: "s3|gdrive|local",
|
Usage: "s3|gdrive|local",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "PROVIDER",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "s3-endpoint",
|
Name: "s3-endpoint",
|
||||||
|
@ -129,31 +142,36 @@ var globalFlags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "s3-no-multipart",
|
Name: "s3-no-multipart",
|
||||||
Usage: "Disables S3 Multipart Puts",
|
Usage: "Disables S3 Multipart Puts",
|
||||||
|
EnvVar: "S3_NO_MULTIPART",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "s3-path-style",
|
Name: "s3-path-style",
|
||||||
Usage: "Forces path style URLs, required for Minio.",
|
Usage: "Forces path style URLs, required for Minio.",
|
||||||
|
EnvVar: "S3_PATH_STYLE",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "gdrive-client-json-filepath",
|
Name: "gdrive-client-json-filepath",
|
||||||
Usage: "",
|
Usage: "",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "GDRIVE_CLIENT_JSON_FILEPATH",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "gdrive-local-config-path",
|
Name: "gdrive-local-config-path",
|
||||||
Usage: "",
|
Usage: "",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "GDRIVE_LOCAL_CONFIG_PATH",
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "gdrive-chunk-size",
|
Name: "gdrive-chunk-size",
|
||||||
Usage: "",
|
Usage: "",
|
||||||
Value: googleapi.DefaultUploadChunkSize / 1024 / 1024,
|
Value: googleapi.DefaultUploadChunkSize / 1024 / 1024,
|
||||||
|
EnvVar: "GDRIVE_CHUNK_SIZE",
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "rate-limit",
|
Name: "rate-limit",
|
||||||
Usage: "requests per minute",
|
Usage: "requests per minute",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
EnvVar: "",
|
EnvVar: "RATE_LIMIT",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "lets-encrypt-hosts",
|
Name: "lets-encrypt-hosts",
|
||||||
|
@ -165,11 +183,13 @@ var globalFlags = []cli.Flag{
|
||||||
Name: "log",
|
Name: "log",
|
||||||
Usage: "/var/log/transfersh.log",
|
Usage: "/var/log/transfersh.log",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "LOG",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "basedir",
|
Name: "basedir",
|
||||||
Usage: "path to storage",
|
Usage: "path to storage",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "BASEDIR",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "clamav-host",
|
Name: "clamav-host",
|
||||||
|
@ -186,31 +206,37 @@ var globalFlags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "profiler",
|
Name: "profiler",
|
||||||
Usage: "enable profiling",
|
Usage: "enable profiling",
|
||||||
|
EnvVar: "PROFILER",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "http-auth-user",
|
Name: "http-auth-user",
|
||||||
Usage: "user for http basic auth",
|
Usage: "user for http basic auth",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "HTTP_AUTH_USER",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "http-auth-pass",
|
Name: "http-auth-pass",
|
||||||
Usage: "pass for http basic auth",
|
Usage: "pass for http basic auth",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "HTTP_AUTH_PASS",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "ip-whitelist",
|
Name: "ip-whitelist",
|
||||||
Usage: "comma separated list of ips allowed to connect to the service",
|
Usage: "comma separated list of ips allowed to connect to the service",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "IP_WHITELIST",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "ip-blacklist",
|
Name: "ip-blacklist",
|
||||||
Usage: "comma separated list of ips not allowed to connect to the service",
|
Usage: "comma separated list of ips not allowed to connect to the service",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "IP_BLACKLIST",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "cors-domains",
|
Name: "cors-domains",
|
||||||
Usage: "comma separated list of domains allowed for CORS requests",
|
Usage: "comma separated list of domains allowed for CORS requests",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVar: "CORS_DOMAINS",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue