Is it possible to create a dummy server name in Flask during production? For example I want the following: www.foo.com
for the development.
def main():
app.run(debug=True, host='foo.com', port=8000)
such that routes like:
@app.route('/bar/')
def bar() -> str:
return 'bar'
would be reached at foo.com/bar/
.
I've tried changing the configuration:
app.config['SERVER_NAME'] = 'foo.com'
but I get an OSError: [Errno 49] Can't assign requested address