Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
app.run(host, port) and SERVER_NAME should correspond to where flask is actually running #2109
Assuming the SERVER_NAME config variable is configured as '0.0.0.0:5555':
In both cases the SERVER_NAME config variable does not correspond to where flask is actually running.
The host and port parameters in app.run() must of course take precedence, but should be set according to the SERVER_NAME config variable if present.
The current implementation in app.run():
Could be replaced by the following:
The following can be used to make sure the SERVER_NAME config variable corresponds to where flask is actually running: