[功能] 更新OpenResty配置,添加连接升级映射和默认服务器块,优化HTTPS和HTTP重定向逻辑

This commit is contained in:
ryan
2026-03-18 22:02:32 +08:00
parent 51a875ab50
commit c84d5bd540
3 changed files with 46 additions and 17 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ events {
http {
include mime.types;
default_type application/octet-stream;
log_format openflare_json escape=json '{"ts":"$time_iso8601","host":"$host","path":"$request_uri","remote_addr":"$remote_addr","status":$status,"request_time":$request_time,"bytes_sent":$body_bytes_sent,"request_length":$request_length}';
{{OpenRestyConnectionUpgradeMap}}{{OpenRestyDefaultServerBlock}} log_format openflare_json escape=json '{"ts":"$time_iso8601","host":"$host","path":"$request_uri","remote_addr":"$remote_addr","status":$status,"request_time":$request_time,"bytes_sent":$body_bytes_sent,"request_length":$request_length}';
access_log {{OpenRestyAccessLogPath}} openflare_json;
sendfile on;
tcp_nopush on;