aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJason McCormick <jason@mfamily.org>2026-10-16 17:04:19 -0400
committerJason McCormick <jason@mfamily.org>2026-10-16 17:04:19 -0400
commit7edb33c87cb1d3ad3421a6fb33247dc871828d7a (patch)
treeb40c4e8eb99248389fe11321b39050a944c1b403 /README.md
parent98119d8fb55e1633d7bdd79db30fd5caea9ee641 (diff)
first run
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 473b078..8df418c 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
A small, dependency-free web application for anonymous single-image submissions. It accepts JPG, PNG, and HEIC files up to 10 MiB, verifies the file signature, replaces the original filename, and stores the image outside the HTTP-served directory.
-Upload forms are available only at named, single-segment targets such as `/logo-contest` or `/911u19jasdl`. The bare `/` path is rejected with HTTP 418. Each target stores its submissions in a separate private directory beneath the configured upload directory.
+Upload forms are available only at named, single-segment targets listed in `allowed-uris.txt`, such as `/logo-contest` or `/911u19jasdl`. Blank lines and lines beginning with `#` are ignored. The bare `/` path is rejected with HTTP 418. Each target stores its submissions in a separate private directory beneath the configured upload directory.
## Run locally
@@ -12,6 +12,8 @@ python3 server.py
Open a target such as <http://127.0.0.1:8000/logo-contest>. By default, its uploads are written to `data/uploads/logo-contest/`, while the server only exposes allow-listed frontend assets. Uploaded files therefore have no HTTP route.
+For local use, edit `allowed-uris.txt` and restart the server after making changes. URI entries must contain exactly one segment composed of letters, numbers, underscores, or hyphens, with a maximum length of 64 characters.
+
For production, choose a private directory on a persistent disk and bind to the needed interface:
```bash
@@ -44,7 +46,7 @@ To install the application, systemd unit, and nginx configuration in one step, r
sudo make install DOMAIN=upload.example.com
```
-This validates the nginx configuration before starting the service and reloading nginx. It requires Python 3, systemd, nginx, `make`, and standard Unix installation tools to already be installed. The generated nginx configuration is `/etc/nginx/conf.d/blind-uploader.conf`.
+This validates the nginx configuration before starting the service and reloading nginx. It requires Python 3, systemd, nginx, `make`, and standard Unix installation tools to already be installed. The generated nginx configuration is `/etc/nginx/conf.d/blind-uploader.conf`. The URI allowlist is installed at `/etc/blind-uploader/allowed-uris`; subsequent installs preserve that file so local URI changes are not overwritten.
To run the test suite without installing anything: