From aa2ae9ffe067c01a0f6abfb8ad0c3fe8eb5b775e Mon Sep 17 00:00:00 2001 From: jirik Date: Thu, 26 Dec 2019 21:16:41 +0100 Subject: [PATCH] Allow requesting layman from other docker containers Fix #38 --- src/layman/__init__.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/layman/__init__.py b/src/layman/__init__.py index 569348696..fc57a64e9 100644 --- a/src/layman/__init__.py +++ b/src/layman/__init__.py @@ -9,19 +9,6 @@ app.secret_key = os.environ['FLASK_SECRET_KEY'] -def _is_ip_address(maybe_ip): - import socket - try: - socket.inet_aton(maybe_ip) - return True - except socket.error: - return False - - -if "." in settings.LAYMAN_PROXY_SERVER_NAME and not _is_ip_address(settings.LAYMAN_PROXY_SERVER_NAME): - app.config['SERVER_NAME'] = settings.LAYMAN_PROXY_SERVER_NAME - - from .http import LaymanError from .make_celery import make_celery celery_app = make_celery(app)