mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 22:24:23 +08:00
fix: bypass_ssl
- move to prestartup_script.py from __init__.py - inproper interpretation of bypass_ssl option reflies on invalid type
This commit is contained in:
parent
7605082862
commit
3303ce7683
@ -13,7 +13,7 @@ import concurrent
|
||||
import ssl
|
||||
from urllib.parse import urlparse
|
||||
|
||||
version = "V0.42"
|
||||
version = "V0.43"
|
||||
print(f"### Loading: ComfyUI-Manager ({version})")
|
||||
|
||||
|
||||
@ -1409,10 +1409,6 @@ async def channel_url_list(request):
|
||||
return web.Response(status=200)
|
||||
|
||||
|
||||
if get_config()['bypass_ssl']:
|
||||
ssl._create_default_https_context = ssl._create_unverified_context # SSL certificate error fix.
|
||||
|
||||
|
||||
WEB_DIRECTORY = "js"
|
||||
NODE_CLASS_MAPPINGS = {}
|
||||
__all__ = ['NODE_CLASS_MAPPINGS']
|
||||
|
||||
@ -151,6 +151,22 @@ except Exception as e:
|
||||
print("** ComfyUI start up time:", datetime.datetime.now())
|
||||
|
||||
|
||||
def check_bypass_ssl():
|
||||
import configparser
|
||||
import ssl
|
||||
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
|
||||
config = configparser.ConfigParser()
|
||||
config.read(config_path)
|
||||
default_conf = config['default']
|
||||
|
||||
if 'bypass_ssl' in default_conf and default_conf['bypass_ssl'].lower() == 'true':
|
||||
print(f"[ComfyUI-Manager] WARN: Unsafe - SSL verification option is Enabled. (see ComfyUI-Manager/config.ini)")
|
||||
ssl._create_default_https_context = ssl._create_unverified_context # SSL certificate error fix.
|
||||
|
||||
|
||||
check_bypass_ssl()
|
||||
|
||||
|
||||
if os.path.exists(restore_snapshot_path):
|
||||
try:
|
||||
import json
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user