Compare commits
2 commits
71242d37ce
...
7f2f7460ac
Author | SHA1 | Date | |
---|---|---|---|
xenofem | 7f2f7460ac | ||
xenofem | 56050a65fd |
|
@ -30,6 +30,12 @@ transbeam is configured with the following environment variables:
|
||||||
(default: `./static`)
|
(default: `./static`)
|
||||||
- `TRANSBEAM_PORT`: port to listen on localhost for http requests
|
- `TRANSBEAM_PORT`: port to listen on localhost for http requests
|
||||||
(default: 8080)
|
(default: 8080)
|
||||||
|
- `TRANSBEAM_REVERSE_PROXY`: whether transbeam is running behind a
|
||||||
|
reverse proxy (recommended), or directly exposed to the internet. If
|
||||||
|
true, transbeam will only bind to localhost, and will use the
|
||||||
|
`Forwarded` or `X-Forwarded-For` headers to determine client IP
|
||||||
|
addresses for logs. If false, transbeam will bind on all interfaces,
|
||||||
|
and will always log the peer IP address. (default: true)
|
||||||
- `TRANSBEAM_MAX_LIFETIME`: maximum number of days files can be kept
|
- `TRANSBEAM_MAX_LIFETIME`: maximum number of days files can be kept
|
||||||
for (default: 30)
|
for (default: 30)
|
||||||
- `TRANSBEAM_MAX_UPLOAD_SIZE`: maximum size of a fileset being
|
- `TRANSBEAM_MAX_UPLOAD_SIZE`: maximum size of a fileset being
|
||||||
|
|
|
@ -288,7 +288,7 @@ async fn main() -> std::io::Result<()> {
|
||||||
let storage_dir: PathBuf = env_or_else("TRANSBEAM_STORAGE_DIR", || PathBuf::from("storage"));
|
let storage_dir: PathBuf = env_or_else("TRANSBEAM_STORAGE_DIR", || PathBuf::from("storage"));
|
||||||
let port: u16 = env_or("TRANSBEAM_PORT", 8080);
|
let port: u16 = env_or("TRANSBEAM_PORT", 8080);
|
||||||
let mnemonic_codes: bool = env_or("TRANSBEAM_MNEMONIC_CODES", true);
|
let mnemonic_codes: bool = env_or("TRANSBEAM_MNEMONIC_CODES", true);
|
||||||
let reverse_proxy: bool = env_or("TRANSBEAM_REVERSE_PROXY", false);
|
let reverse_proxy: bool = env_or("TRANSBEAM_REVERSE_PROXY", true);
|
||||||
let max_lifetime: u16 = env_or("TRANSBEAM_MAX_LIFETIME", 30);
|
let max_lifetime: u16 = env_or("TRANSBEAM_MAX_LIFETIME", 30);
|
||||||
let max_upload_size: u64 =
|
let max_upload_size: u64 =
|
||||||
env_or::<ByteSize>("TRANSBEAM_MAX_UPLOAD_SIZE", ByteSize(16 * bytesize::GB)).as_u64();
|
env_or::<ByteSize>("TRANSBEAM_MAX_UPLOAD_SIZE", ByteSize(16 * bytesize::GB)).as_u64();
|
||||||
|
|
Loading…
Reference in a new issue