From 8a1e21c79de84f7e9338523193d974623340d0a6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 29 Feb 2024 17:41:29 +0000 Subject: [PATCH] Ensure headscale sees the correct IP --- ansible/roles/headscale/files/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/roles/headscale/files/nginx.conf b/ansible/roles/headscale/files/nginx.conf index 4b9ef7e..66231aa 100644 --- a/ansible/roles/headscale/files/nginx.conf +++ b/ansible/roles/headscale/files/nginx.conf @@ -13,6 +13,10 @@ server { ssl_trusted_certificate /etc/letsencrypt/live/headscale.jakehoward.tech/chain.pem; include includes/ssl.conf; + real_ip_header proxy_protocol; + + set_real_ip_from 127.0.0.1; + location / { proxy_pass http://localhost:8416; }