No description
Find a file
Conrad Hoffmann 8f7854feb6 git.sr.ht: dry run rate limit archive endpoint
Run the rate limiting module [1] in dry run mode for the archive
endpoint (downloading of tarballs for specific revisions). This is
mostly to collect intelligence for now to guide future decisions about
rate limiting.

[1] https://nginx.org/en/docs/http/ngx_http_limit_req_module.html
2026-05-11 12:51:11 +02:00
networks Add some notable lists of networks 2025-03-05 11:05:09 +01:00
pages.sr.ht pages.sr.ht: turn on HTTP/2 2023-10-24 13:54:14 +02:00
builds.sr.ht.conf builds.sr.ht: route requests through go-away 2025-09-05 07:23:51 +02:00
chat.sr.ht.conf *.conf: update CSP 2023-09-14 14:13:53 +02:00
git.sr.ht.conf git.sr.ht: dry run rate limit archive endpoint 2026-05-11 12:51:11 +02:00
graphql.conf web, graphql: set X-Forwarded-For properly 2021-08-30 10:36:23 +02:00
headers.conf Include common headers from separate file 2022-03-15 12:34:20 +01:00
hg.sr.ht.conf hg.sr.ht: add go-away 2025-10-02 11:24:18 +02:00
hub.sr.ht.conf hub.sr.ht: add unsafe-inline to script-src 2026-03-04 12:06:31 +01:00
LICENSE Initial commit 2020-08-31 18:05:28 -04:00
lists.sr.ht.conf lists.sr.ht: add s3.sr.ht to img-src 2026-01-09 10:32:17 +01:00
man.sr.ht.conf services: add docs.sourcehut.org to frame-src in CSP 2025-09-01 11:35:20 +02:00
meta.sr.ht.conf meta.sr.ht.conf: add s3.sr.ht to img-src 2026-01-07 16:47:23 +01:00
nginx.conf all: move domains.conf => sourcehut.conf 2021-08-30 09:29:53 +02:00
paste.sr.ht.conf services: add docs.sourcehut.org to frame-src in CSP 2025-09-01 11:35:20 +02:00
port80.conf all: refactor common config options into includes 2021-08-30 09:22:32 +02:00
port443.conf Improve compression settings 2025-07-25 10:43:21 +02:00
README.md README.md: fix typo 2021-11-28 11:33:17 +01:00
robots.txt robots.txt: add more facebook crap 2026-04-05 08:29:46 +02:00
sourcehut.conf sourcehut.conf: update our trusted CIDRs 2024-10-11 14:24:35 +02:00
todo.sr.ht.conf services: add docs.sourcehut.org to frame-src in CSP 2025-09-01 11:35:20 +02:00
web.conf web, graphql: set X-Forwarded-For properly 2021-08-30 10:36:23 +02:00

sr.ht-nginx

This is the nginx configuration files used by sr.ht in production. They are designed to run on an Alpine Linux system using the official sourcehut Alpine packages. You may use them on your own servers, but your mileage may vary. Install the -nginx package (e.g. git.sr.ht-nginx) to pull in these files, then edit /etc/nginx/domains.conf (and /etc/nginx/nginx.conf, if necessary) to suit your particular installation.

You should also write your own file, *-ssl.conf (e.g. /etc/nginx/builds-ssl.conf), which configures the SSL certificate, like so:

ssl_certificate /etc/ssl/uacme/builds.sr.ht/cert.pem;
ssl_certificate_key /etc/ssl/uacme/private/builds.sr.ht/key.pem;

This is annoying. You can thank the nginx devs.