Skip to content

Commit

Permalink
docs: update on what SHOULD_AUTH actually does
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuxas committed Oct 31, 2024
1 parent 0668e42 commit b73c06f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions abyss.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
2 changes: 1 addition & 1 deletion generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b73c06f

Please sign in to comment.