server/report-receiver/receiver.py takes what report sends to federated.sh/report, behind Caddy, and files each report as an issue in the private Federated_Computer/coredesktop-reports repository with the full log attached. It saves each report before replying and tries Gitea again later if it's down, limits how many reports one address can send, and refuses oversized logs, gzip bombs included. Standard library only. The README has the deployment steps: a Gitea user that can only file issues there, the systemd unit, and the Caddy route. make test runs its tests, which send reports with the real report client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
647 B
Caddyfile
21 lines
647 B
Caddyfile
# What federated.sh's site block needs, wherever its Caddyfile is. `handle`
|
|
# blocks are tried in order and only the first match runs, so /report goes to
|
|
# the receiver and everything else does what it did before. A top-level `redir`
|
|
# runs before any `handle`, so the existing redirect has to move into the
|
|
# catch-all `handle` below, or POSTs to /report would be redirected too.
|
|
|
|
federated.sh {
|
|
@report path /report /report/*
|
|
handle @report {
|
|
request_body {
|
|
max_size 11MB
|
|
}
|
|
reverse_proxy 127.0.0.1:8650
|
|
}
|
|
|
|
handle {
|
|
# ...the existing directives for federated.sh, unchanged, e.g. the
|
|
# redirect that sends wget to install.sh
|
|
}
|
|
}
|