From f8e5b54a98bd67018ccee647bc619cdb8f45e6e8 Mon Sep 17 00:00:00 2001 From: mercury Date: Fri, 20 Dec 2024 03:25:35 +0400 Subject: [PATCH] fix tlgrm handle --- app/bot.php | 4 ++-- config/nginx.conf | 17 +++++++++++++---- config/nginx_default.conf | 17 +++++++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/app/bot.php b/app/bot.php index ab8dc06..ce85792 100644 --- a/app/bot.php +++ b/app/bot.php @@ -4241,8 +4241,8 @@ DNS-over-HTTPS with IP: $text = $menu[$type ?: 'main' ]['text']; $data = $menu[$type ?: 'main' ]['data']; - if (empty($type)) { - $b = exec('git -C / rev-parse --abbrev-ref HEAD'); + if (empty($type) && $update) { + $b = exec('git -C / rev-parse --abbrev-ref HEAD'); array_unshift($data, [ [ 'text' => 'changelog', diff --git a/config/nginx.conf b/config/nginx.conf index 9f0eaac..9c5bde4 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -35,6 +35,19 @@ http { } } + server { + listen 10.10.0.2:443 ssl http2 proxy_protocol; + listen 10.10.1.2:443 ssl http2; + + ssl_certificate /certs/self_public; + ssl_certificate_key /certs/self_private; + + location /tlgrm { + access_log /logs/nginx_tlgrm_access; + proxy_pass http://php; + } + } + #~ server { @@ -55,10 +68,6 @@ http { index override.html login.html; try_files $uri $uri/ =404; } - location /tlgrm { - access_log /logs/nginx_tlgrm_access; - proxy_pass http://php; - } location /adguard/ { access_log /logs/nginx_adguard_access; proxy_pass http://ad:80/; diff --git a/config/nginx_default.conf b/config/nginx_default.conf index 9f0eaac..9c5bde4 100644 --- a/config/nginx_default.conf +++ b/config/nginx_default.conf @@ -35,6 +35,19 @@ http { } } + server { + listen 10.10.0.2:443 ssl http2 proxy_protocol; + listen 10.10.1.2:443 ssl http2; + + ssl_certificate /certs/self_public; + ssl_certificate_key /certs/self_private; + + location /tlgrm { + access_log /logs/nginx_tlgrm_access; + proxy_pass http://php; + } + } + #~ server { @@ -55,10 +68,6 @@ http { index override.html login.html; try_files $uri $uri/ =404; } - location /tlgrm { - access_log /logs/nginx_tlgrm_access; - proxy_pass http://php; - } location /adguard/ { access_log /logs/nginx_adguard_access; proxy_pass http://ad:80/;