ssss
This commit is contained in:
parent
cbba65f450
commit
4cd8c65524
3 changed files with 7 additions and 11 deletions
|
|
@ -1,6 +1,4 @@
|
|||
print("Import Flask")
|
||||
from flask import Flask
|
||||
print("Import Flask-Cors")
|
||||
from flask_cors import CORS
|
||||
|
||||
|
||||
|
|
@ -9,7 +7,7 @@ def create_app(flask_env='development'):
|
|||
app = Flask(__name__, instance_relative_config=False, static_url_path='')
|
||||
origin = app.config.get('ALLOW_ORIGIN')
|
||||
if origin is None:
|
||||
origin = ['http://10.1.1.10', 'http://10.1.5.10']
|
||||
origin = ['http://10.1.1.10']
|
||||
CORS(app, supports_credentials=True, origins=origin)
|
||||
if flask_env == 'production':
|
||||
app.config.from_object("config.ProductionConfig")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue