Update: Cors Origin
This commit is contained in:
parent
40cf1c239a
commit
f0417b49a3
2 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ def create_app(flask_env='development'):
|
||||||
app = Flask(__name__, instance_relative_config=False, static_url_path='')
|
app = Flask(__name__, instance_relative_config=False, static_url_path='')
|
||||||
origin = app.config.get('ALLOW_ORIGIN')
|
origin = app.config.get('ALLOW_ORIGIN')
|
||||||
if origin is None:
|
if origin is None:
|
||||||
origin = ['http://10.1.1.10', 'http://10.1.5.10', 'http://10.1.1.10:4200', 'http://10.1.5.10:4200']
|
origin = ['http://127.0.0.1', 'http://localhost', 'http://127.0.0.1:4200', 'http://localhost:4200', 'http://10.1.1.10', 'http://10.1.5.10', 'http://10.1.1.10:4200', 'http://10.1.5.10:4200']
|
||||||
CORS(app, supports_credentials=True, origins=origin)
|
CORS(app, supports_credentials=True, origins=origin)
|
||||||
if flask_env == 'production':
|
if flask_env == 'production':
|
||||||
app.config.from_object("config.ProductionConfig")
|
app.config.from_object("config.ProductionConfig")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
debutUrl: 'http://10.1.1.10:5000/api/'
|
debutUrl: 'http://127.0.0.1:5000/api/'
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue