From 768d0f5c6b9c08cd82585323b069f4d69b9ae83d Mon Sep 17 00:00:00 2001 From: R4v3zn Date: Thu, 23 Apr 2020 10:08:47 +0800 Subject: [PATCH] v1.0.1 --- vulfocus-api/vulfocus/settings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vulfocus-api/vulfocus/settings.py b/vulfocus-api/vulfocus/settings.py index 9b8c8611..7abd54da 100644 --- a/vulfocus-api/vulfocus/settings.py +++ b/vulfocus-api/vulfocus/settings.py @@ -154,8 +154,11 @@ client = docker.DockerClient(base_url='unix://var/run/docker.sock') # 靶场绑定 IP,提供用户访问靶场与 Docker 服务IP保持一致。 VUL_IP = "" -if os.environ['VUL_IP']: - VUL_IP = os.environ['VUL_IP'] +try: + if os.environ['VUL_IP']: + VUL_IP = os.environ['VUL_IP'] +except Exception as e: + pass # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/