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

@@ -7,6 +7,7 @@ import traceback
# third-party
from flask import Blueprint, request, render_template, redirect, jsonify, abort
from flask_login import login_required
import flask_cors
# sjva 공용
from framework.logger import get_logger
@@ -24,7 +25,8 @@ from .my_youtube_dl import Youtube_dl
# 플러그인 공용
#########################################################
blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join(os.path.dirname(__file__), 'templates'))
if ModelSetting.get_bool('activate_cors') == True:
flask_cors.CORS(blueprint)
menu = {
'main': [package_name, 'youtube-dl'],
'sub': [