CORS 옵션 추가 (#1)

* repack

* default db add

* flask_cors install

* activate_cors option on_off

* debug_model

* activate_cors inner ajax func

* cors_option move

* debug

* cors option added.

* activate_cors_added.

* debug

* 변경점 최소화

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
This commit is contained in:
Choi YunJun
2020-04-07 13:13:21 +09:00
committed by GitHub
parent cce361fe79
commit 9a66d4540f
3 changed files with 11 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ class Logic(object):
'db_version': '1',
'temp_path': os.path.join(path_data, 'download_tmp'),
'save_path': os.path.join(path_data, 'download'),
'default_filename': '%(title)s-%(id)s.%(ext)s'
'default_filename': '%(title)s-%(id)s.%(ext)s',
'activate_cors': True
}
@staticmethod
@@ -49,6 +50,11 @@ class Logic(object):
# glob2 설치
logger.debug('glob2 install')
logger.debug(subprocess.check_output([sys.executable, '-m', 'pip', 'install', 'glob2'], universal_newlines=True))
try:
import flask_cors
except Exception as e:
logger.debug('flask_cors install')
logger.debug(subprocess.check_output([sys.executable, '-m', 'pip', 'install', 'flask_cors'], universal_newlines=True))
# youtube-dl 업데이트
logger.debug('youtube-dl upgrade')