From f3d437826e3237e9c83a78559b2e6d13953ebc0c Mon Sep 17 00:00:00 2001 From: AlexBa16 Date: Mon, 1 Jun 2026 17:26:19 +0200 Subject: [PATCH] C11 --- proxy/nginx.conf | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/proxy/nginx.conf b/proxy/nginx.conf index a88c6ec..e519813 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -29,6 +29,30 @@ http { server { listen 80; + server_name _; + + location / { + return 301 https://$host:8443$request_uri; + } + + location = /healthz { + default_type text/plain; + return 200 "ok\n"; + } + + location = /internal/status { + access_log off; + default_type text/plain; + + if ($remote_addr != 127.0.0.1) { + return 403; + } + + return 200 "internal ok\n"; + } + } + + server { listen 443 ssl; server_name localhost; ssl_certificate /etc/nginx/certs/localhost.crt; @@ -71,21 +95,5 @@ http { proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - - location = /healthz { - default_type text/plain; - return 200 "ok\n"; - } - - location = /internal/status { - access_log off; - default_type text/plain; - - if ($remote_addr != 127.0.0.1) { - return 403; - } - - return 200 "internal ok\n"; - } } }