From ff045106fcf07c727a1ab60a0df038eaefcddb2f Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Mon, 22 Dec 2025 16:24:58 +0300 Subject: [PATCH] [+] update gateway 1. some refactor for nginx_config.py; 1.1. just tested that ssl-app can correctly show a remote_addr; 1.1.1 TODO, figure out how to preserve this info when doing proxy_pass to ssl app; (hm, seems like no way); 2. exposed ssl-app port at SSL_APP_PORTS endpoint; --- d1/nginx_config.py | 1 + docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/d1/nginx_config.py b/d1/nginx_config.py index fd9dff5..db87695 100644 --- a/d1/nginx_config.py +++ b/d1/nginx_config.py @@ -459,6 +459,7 @@ server { server { set $t1 $remote_addr; + if ($http_x_forwarded_for) { set $t1 $http_x_forwarded_for; diff --git a/docker-compose.yml b/docker-compose.yml index afb83ee..95b2a47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,6 +35,8 @@ services: - ./tmp/d1/:/app/tmp/d1/:ro - ./tmp/d1/letsencrypt:/etc/letsencrypt:rw restart: on-failure + ports: + - ${SSL_APP_PORTS:-"127.0.0.1:443"}:444 networks: network: