cors
This commit is contained in:
parent
47008dc23a
commit
09bf8fd641
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,8 @@ for path in paths:
|
||||||
|
|
||||||
# more imports
|
# more imports
|
||||||
import config
|
import config
|
||||||
|
from sanic_cors import CORS, cross_origin
|
||||||
|
|
||||||
from app.services import database
|
from app.services import database
|
||||||
from app.services import processor
|
from app.services import processor
|
||||||
from app.controllers import api
|
from app.controllers import api
|
||||||
|
@ -57,7 +59,7 @@ processor.start(template_path)
|
||||||
logger.info("Start Stacosys application")
|
logger.info("Start Stacosys application")
|
||||||
|
|
||||||
# enable CORS
|
# enable CORS
|
||||||
#cors = CORS(app, resources={r"/comments/*": {"origins": "*"}})
|
cors = CORS(app, resources={r"/comments/*": {"origins": "*"}})
|
||||||
|
|
||||||
# tune logging level
|
# tune logging level
|
||||||
if not config.DEBUG:
|
if not config.DEBUG:
|
||||||
|
|
Loading…
Add table
Reference in a new issue