From 21efe293418c16e5e78e32e5948c233f29faeefe Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Sun, 6 Oct 2024 17:18:20 +0200 Subject: [PATCH] simplify redirect statement --- roles/netbox/templates/vhost.j2 | 2 +- roles/tileserver/templates/vhost.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/netbox/templates/vhost.j2 b/roles/netbox/templates/vhost.j2 index bad6aa5..2cb10f5 100644 --- a/roles/netbox/templates/vhost.j2 +++ b/roles/netbox/templates/vhost.j2 @@ -10,7 +10,7 @@ server { } location / { - return 301 https://{{ netbox_domain }}$request_uri; + return 301 https://$host$request_uri; } } diff --git a/roles/tileserver/templates/vhost.j2 b/roles/tileserver/templates/vhost.j2 index 0957354..3f2d35c 100644 --- a/roles/tileserver/templates/vhost.j2 +++ b/roles/tileserver/templates/vhost.j2 @@ -10,7 +10,7 @@ server { } location / { - return 301 https://{{ tileserver_domain }}$request_uri; + return 301 https://$host$request_uri; } }