From 05e787baba77a133303c490f992fe356957d4306 Mon Sep 17 00:00:00 2001 From: 1e99 Date: Fri, 8 Nov 2024 16:06:59 +0100 Subject: [PATCH] document new env variables --- README.md | 12 +++++++----- main.go | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 07224dd..e228b03 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,10 @@ PASSED_STORE_TYPE=dir ./passed ## Configuration Configuration is done with environment variables. -- `PASSED_ADDRESS`: Specifies the address that PassED should listen on, defaults to `:3000` -- `PASSED_STORE_TYPE`: Specify which store to use to save passwords, defaults to `ram`: - - `ram`: Stores all passwords in RAM, they are lost on restart - - `dir`: Stores all passwords in a directory. Requires `PASSED_STORE_DIR_PATH` to be set to the directory, defaults to `passwords`. PassED will not create the directory. -- `STORE_CLEAR_EXPIRED_INTERVAL`: Specifies the delay in seconds to wait between clearing expired passwords, defaults to `30`. +- `PASSED_ADDRESS`: Specifies the address that PassED should listen on, defaults to `:3000`. +- `PASSED_LOG_REQUESTS`: Specifies wether HTTP requests should be logged or not, defaults to `true`. +- `PASSED_MAX_LENGTH`: Specifies the maximum password length in bytes, defaults to `12288` (12KiB). +- `PASSED_STORE_TYPE`: Specify which store is used to save passwords, defaults to `ram`: + - `ram`: Stores all passwords in RAM, they are lost on restart. + - `dir`: Stores all passwords in a directory. Requires `PASSED_STORE_DIR_PATH` to be set to the directory, defaults to `passwords`. PassED will **not** create the directory. +- `PASSED_STORE_CLEAR_INTERVAL`: Specifies the delay in seconds to wait between clearing expired passwords, defaults to `30`. diff --git a/main.go b/main.go index 61e68ba..80af6c6 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,7 @@ func run() error { func newStore() (store storage.Store, err error) { var storeType string var clearInterval int - config.Env("PASSED_STORE", &storeType, "ram") + config.Env("PASSED_STORE_TYPE", &storeType, "ram") config.Env("PASSED_STORE_CLEAR_INTERVAL", &clearInterval, "30") switch storeType {