From 42f272ad3278eec6920a70a22fab549b79300054 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Tue, 21 Mar 2023 13:06:19 +0100 Subject: [PATCH] [fix] Detection of domain --- images/openwisp_nginx/get_domain.py | 5 +---- images/openwisp_nginx/requirements.txt | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/images/openwisp_nginx/get_domain.py b/images/openwisp_nginx/get_domain.py index 254cdfb5..afa78178 100644 --- a/images/openwisp_nginx/get_domain.py +++ b/images/openwisp_nginx/get_domain.py @@ -1,7 +1,4 @@ import os import sys -import tldextract - -ext = tldextract.extract(os.environ['API_DOMAIN']) -sys.stdout.write(ext.registered_domain) +sys.stdout.write(".".join(os.environ['API_DOMAIN'].split(".")[1:])) diff --git a/images/openwisp_nginx/requirements.txt b/images/openwisp_nginx/requirements.txt index d844bddd..e69de29b 100644 --- a/images/openwisp_nginx/requirements.txt +++ b/images/openwisp_nginx/requirements.txt @@ -1 +0,0 @@ -tldextract~=3.2.0