默认的django开发服务器是安全的还是其他人可以访问它



我是django/python的新手,我想确保如果我自己从工作机器上学习django,那么当django设置其自动开发服务器时,不会出现某种安全漏洞。我正在使用此教程:https://docs.djangoproject.com/en/2.1/intro/tutorial01/

他们让你将开发服务器设置为:

$ python manage.py runserver

输出:

Performing system checks...
System check identified no issues (0 silenced).
You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.
November 17, 2018 - 15:50:53
Django version 2.1, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

其他人可以从网络内或仅通过互联网访问此服务器吗?如何检查?

localhost(相当于127.0.0.1(上托管开发服务器不会使您面临系统中可能存在的任何风险。你必须做出非常慎重的努力,让外部连接可以访问它。

如果希望在本地网络上访问该站点,则可以在0.0.0.0上托管。最重要的是,你要么已经以某种方式受到了损害,要么已经做出了深思熟虑的努力,才能通过运行开发服务器来暴露更多信息。只是在转移到生产时不要使用它。

最新更新