docs: update on what SHOULD_AUTH actually does
This commit is contained in:
parent
0668e42ea8
commit
b73c06f1ab
@ -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:
|
||||
|
||||
|
4
abyss.go
4
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")
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user