Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
78 lines
2.0 KiB
Plaintext
78 lines
2.0 KiB
Plaintext
# Spark HTTP — sparkapi.wyrs365.com
|
|
# Public :443 is stream ssl_preread (see stream.d/spark-sni.conf).
|
|
# This vhost terminates TLS on loopback :8443 (PROXY protocol from stream).
|
|
|
|
upstream spark_http {
|
|
server 127.0.0.1:18080;
|
|
keepalive 16;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name sparkapi.wyrs365.com;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name sparkim.wyrs365.com;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 404;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:8443 ssl proxy_protocol;
|
|
listen [::1]:8443 ssl proxy_protocol;
|
|
http2 on;
|
|
server_name sparkapi.wyrs365.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/sparkapi.wyrs365.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/sparkapi.wyrs365.com/privkey.pem;
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:SparkSSL:10m;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
|
|
client_max_body_size 32m;
|
|
proxy_connect_timeout 5s;
|
|
proxy_send_timeout 60s;
|
|
proxy_read_timeout 60s;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
|
|
location /readyz {
|
|
allow 127.0.0.1;
|
|
allow ::1;
|
|
deny all;
|
|
proxy_pass http://spark_http;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://spark_http;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
}
|
|
}
|