cors init
This commit is contained in:
parent
b10465e353
commit
6d712685d5
@ -1,5 +1,6 @@
|
||||
from flask import Flask
|
||||
from app.routes import main
|
||||
from flask_cors import CORS
|
||||
import os
|
||||
|
||||
def create_app():
|
||||
@ -7,5 +8,6 @@ def create_app():
|
||||
template_path = os.path.join(base_dir, '..', 'templates')
|
||||
static_path = os.path.join(base_dir, '..','static')
|
||||
app = Flask(__name__, template_folder=template_path, static_folder=static_path)
|
||||
CORS(app, resources={r"/api/*": {"origins": "*"}})
|
||||
app.register_blueprint(main)
|
||||
return app
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user