reconfig env variable for socketio cors

This commit is contained in:
Sorrel Bri 2019-10-13 21:55:51 -07:00
parent 9365342f40
commit 9553454d18

2
app.py
View file

@ -18,7 +18,7 @@ app.config.from_object(os.getenv('CONFIGURATION_OBJECT'))
# ! Environment Variable # ! Environment Variable
# TODO export ALLOWED_ORIGIN= whatever the react server is # TODO export ALLOWED_ORIGIN= whatever the react server is
# TODO cors_allowed_origins=os.getenv('ALLOWED_ORIGIN') # TODO cors_allowed_origins=os.getenv('ALLOWED_ORIGIN')
socketio = SocketIO(app, cors_allowed_origins=['http://localhost:3000', 'http://localhost:3001']) socketio = SocketIO(app, cors_allowed_origins=os.getenv('ALLOWED_ORIGIN'))
def create_app(): def create_app():
CORS(app, resources={ CORS(app, resources={