walle 最近的时间轴更新
walle

walle

V2EX 第 22091 号会员,加入于 2012-06-10 14:38:39 +08:00
walle 最近回复了
2015-05-06 10:58:49 +08:00
回复了 ca1n 创建的主题 Flask flask.ext.script 建立的 manager 要怎么设定才能让外网访问呢?
使用nginx是正确的做法。
前几天也被这个困扰到,所以直接找到/usr/local/lib/python2.7/dist-packages/flask_script里面的commands.py文件把里面的host='127.0.0.1'改成host='0.0.0.0'。

当我把这个提交到github上去的时候,一个项目维护者给了我这么一段话。
Don't use the dev server for production. Use a real app and web server combo, such as uwsgi and nginx.

With this change, you make everyone expose their dev code in debug mode to anyone on the network by default, which is a bad idea.
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1392 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 23:44 · PVG 07:44 · LAX 16:44 · JFK 19:44
Developed with CodeLauncher
♥ Do have faith in what you're doing.