From 7edb33c87cb1d3ad3421a6fb33247dc871828d7a Mon Sep 17 00:00:00 2001 From: Jason McCormick Date: Fri, 16 Oct 2026 17:04:19 -0400 Subject: first run --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'README.md') 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 . 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: -- cgit v1.2.3