39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
server {
|
|
|
|
server_name api.spacebar.zzls.xyz;
|
|
include configs/general.conf;
|
|
include configs/security.conf;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:3001;
|
|
proxy_set_header Host $host;
|
|
proxy_pass_request_headers on;
|
|
add_header Last-Modified $date_gmt;
|
|
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
|
proxy_no_cache 1;
|
|
proxy_cache_bypass 1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
|
|
|
# QUIC
|
|
add_header Alt-Svc 'h3=":443"; ma=86400';
|
|
|
|
listen 443 quic;
|
|
listen 443 ssl http2;
|
|
include configs/ssl.conf;
|
|
|
|
}
|
|
server {
|
|
if ($host = api.spacebar.zzls.xyz) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
listen 80;
|
|
server_name api.spacebar.zzls.xyz;
|
|
}
|