Update: cors prod

This commit is contained in:
Yûki VACHOT 2022-01-24 23:08:21 +01:00
parent a8a9319f88
commit fad34ea66f
4 changed files with 1 additions and 34 deletions

View file

@ -10,7 +10,7 @@ def create_app(flask_env='development'):
app = Flask(__name__, instance_relative_config=False)
origin = app.config.get('ALLOW_ORIGIN')
if origin is None:
origin = ['http://127.0.0.1:4200', 'http://localhost:4200']
origin = ['http://10.1.1.10:4200', 'https://10.1.1.10:4200', 'http://127.0.0.1:4200', 'http://localhost:4200']
CORS(app, supports_credentials=True, origins=origin)
if flask_env == 'production':
app.config.from_object("config.ProductionConfig")