import ngx from "jsr:@char/ngx@0.1"; export const config = ngx("", [ ngx("map $http_upgrade $connection_upgrade", [ "default upgrade", "'' close" ]), [], ngx("server", [ [ "server_name pds.bun.how", ...ngx.listen(), ...ngx.letsEncrypt("pds.bun.how"), ], ngx("if ($http_user_agent ~ (freundica\.de))", [ "return 444" ]), ngx("location /", [ "client_max_body_size 1G", "proxy_pass http://127.0.0.7:2583", "proxy_http_version 1.1", "proxy_set_header Upgrade $http_upgrade", "proxy_set_header Connection $connection_upgrade", "proxy_set_header Host $host", "proxy_read_timeout 300s", ]), ngx("location = /hi-res-bnuy.png", ["root /srv/www/pds.bun.how"]), ngx("location = /", ["root /srv/www/pds.bun.how", "index hi-res-bnuy.png"]), ngx("location = /xrpc/app.bsky.unspecced.getAgeAssuranceState", [ "default_type application/json", `add_header access-control-allow-headers "authorization,dpop,atproto-accept-labelers,atproto-proxy" always`, `add_header access-control-allow-origin "*" always`, `return 200 '{"status": "assured", "lastInitiatedAt": "2025-07-25T05:54:31.995Z"}'` ]), ]), ]); if (import.meta.main) console.log(config.build());