infra/ngx/jetstream.ts

27 lines
695 B
TypeScript

import ngx from "jsr:@char/ngx@0.2";
export const config = ngx("", [
ngx("map $http_upgrade $connection_upgrade", [
"default upgrade",
"'' close"
]),
[],
ngx("server", [
[
ngx.serverName("jetstream.cerulea.blue"),
ngx.listen(),
ngx.letsEncrypt("jetstream.cerulea.blue"),
],
ngx("location /", [
"client_max_body_size 100M",
"proxy_pass http://127.0.0.1:6008",
"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",
]),
]),
]);
if (import.meta.main) console.log(config.build());