Compare commits

..

No commits in common. "b73c06f1abc7fd96d82f0f64961741945f2aa750" and "f2e38fda23e588769073881db9535773195953a4" have entirely different histories.

4 changed files with 5 additions and 6 deletions

View File

@ -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 you will need authentication (same auth as `/tree`), any value other than that and upload is authless
- `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
## todo:

View File

@ -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 will be restricted")
slog.Warn("text uploading through the browser will be restricted")
} else {
mux.HandleFunc("/upload", app.uploadHandler)
slog.Warn("text uploading will NOT be restricted")
slog.Warn("text uploading through the browser will NOT be restricted")
}
}

View File

@ -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 browser or curl)
# This is whether you need a password to upload text through the browser
SHOULD_AUTH=$SHOULD_AUTH
# This is the key needed to make uploads. Include it as X-Auth in curl.

View File

@ -21,8 +21,7 @@
</div>
<form action="/upload" method="POST">
<textarea name="content" placeholder="Enter your content here..."></textarea>
<br />
<textarea name="content" placeholder="Enter your content here..."></textarea><br />
<button type="submit">upload</button>
</form>