Serve plain-text pages to curl/wget/httpie clients #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nginx-cli-content-negotiation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 copynginx-cli-detect.confinto/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>