From b73c06f1abc7fd96d82f0f64961741945f2aa750 Mon Sep 17 00:00:00 2001 From: jabuxas Date: Thu, 31 Oct 2024 10:17:23 -0300 Subject: [PATCH] docs: update on what SHOULD_AUTH actually does --- README.md | 2 +- abyss.go | 4 ++-- generate_config.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3d436fd..e470408 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ abyss is a basic and mostly single user http server written in go made for uploa - `UPLOAD_KEY`: this is key checked when uploading files. if the key doesn't match with server's one, then it refuses uploading. - `ABYSS_FILEDIR`: this points to the directory where abyss will save the uploads to. defaults to `./files` - `ABYSS_PORT`: this is the port the server will run on. safe to leave empty. defaults to 3235 -- `SHOULD_AUTH`: if it is `yes`, then to upload text through the browser you will need authentication (same auth as `/tree`), any value other than that and upload is auth-less +- `SHOULD_AUTH`: if it is `yes`, then to upload text you will need authentication (same auth as `/tree`), any value other than that and upload is authless ## todo: diff --git a/abyss.go b/abyss.go index 8feca9e..f723add 100644 --- a/abyss.go +++ b/abyss.go @@ -103,9 +103,9 @@ func setupHandlers(mux *http.ServeMux, app *Application) { if app.authUpload == "yes" { mux.HandleFunc("/upload", BasicAuth(app.uploadHandler, app)) - slog.Warn("text uploading through the browser will be restricted") + slog.Warn("text uploading will be restricted") } else { mux.HandleFunc("/upload", app.uploadHandler) - slog.Warn("text uploading through the browser will NOT be restricted") + slog.Warn("text uploading will NOT be restricted") } } diff --git a/generate_config.sh b/generate_config.sh index c18b23f..0cb6bd0 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -43,7 +43,7 @@ AUTH_USERNAME=$AUTH_USERNAME # This is the password of the user for accessing /tree AUTH_PASSWORD=$AUTH_PASSWORD -# This is whether you need a password to upload text through the browser +# This is whether you need a password to upload text (through browser or curl) SHOULD_AUTH=$SHOULD_AUTH # This is the key needed to make uploads. Include it as X-Auth in curl.