Serve plain-text pages to curl/wget/httpie clients #1

Merged
zach merged 1 commit from nginx-cli-content-negotiation into main 2026-09-19 06:03:15 +00:00
Owner

Adds a $cli_ext map (conf.d, http-level) that nginx-site.conf uses to prefer a page's .txt sibling over .html when the request looks like a CLI client (curl/wget/httpie) or asks for text/plain. Pairs with zach/zach.town#curl-plaintext-pages, which adds the .txt pages.

Needs a manual redeploy on the box (re-run 02-website/setup.sh, or copy nginx-cli-detect.conf into /etc/nginx/conf.d/ + reload) since installing files outside the passwordless sudo scope requires interactive sudo.

Adds a $cli_ext map (conf.d, http-level) that nginx-site.conf uses to prefer a page's .txt sibling over .html when the request looks like a CLI client (curl/wget/httpie) or asks for text/plain. Pairs with zach/zach.town#curl-plaintext-pages, which adds the .txt pages. Needs a manual redeploy on the box (re-run `02-website/setup.sh`, or copy `nginx-cli-detect.conf` into `/etc/nginx/conf.d/` + reload) since installing files outside the passwordless sudo scope requires interactive sudo.
Adds a $cli_ext map (conf.d, since map needs http{} context) that
nginx-site.conf uses to prefer a page's .txt sibling over its .html
when the request looks like a CLI client or asks for text/plain.
Pairs with the .txt pages added in the zach.town repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
zach merged commit 08049ed135 into main 2026-09-19 06:03:15 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zach/vps-bootstrap!1
No description provided.