Request Host Not Whitelisted When Running Flask

preview
workspace
flask
python
environment

#1

When running my flask app locally with dev_appserver.py --host 0.0.0.0 --port 8080 app.yaml I’m getting a message that the request host is not whitelist enabled for that server. I am able to get it running by setting --enable_host_checking to false but I don’t understand what I’m exactly doing with that flag. I’d love to learn what this means and how to resolve the issue without setting the host checking flag to false. Thanks!

Messages after running flask below without the flag set to false:

INFO     2018-02-01 18:22:37,893 devappserver2.py:105] Skipping SDK update check.
INFO     2018-02-01 18:22:38,069 api_server.py:308] Starting API server at: http://localhost:42895
WARNING  2018-02-01 18:22:38,069 dispatcher.py:316] Your python27 micro version is below 2.7.12, our current production version.
INFO     2018-02-01 18:22:38,082 dispatcher.py:255] Starting module "default" running at: http://0.0.0.0:8080
INFO     2018-02-01 18:22:38,083 admin_server.py:146] Starting admin server at: http://localhost:8000
ERROR    2018-02-01 18:22:40,374 wsgi_server.py:329] Request Host portfolio-workspace-cjacobs7.c9users.io not whitelisted. Enabled hosts are set(['0.0.0.0'])