From 0ee0ac4936c98a3c5d75360056b18c3b25e19372 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sat, 31 Jul 2021 13:55:58 +0800 Subject: [PATCH] Fix: reset hostname for each request --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index fd8f162..95febc7 100644 --- a/main.py +++ b/main.py @@ -60,7 +60,7 @@ class CloudInitApp: try: self.hostinfo = socket.gethostbyaddr(self.remoteip) except socket.herror: - pass + self.hostinfo = ('localhost', ) def _redirect_if_needed(self): filepath = os.path.join(PATH, "data", self.hostinfo[0],