Heroku上的错误请求400 Django应用程序

2024-06-13 14:33:11 发布

您现在位置:Python中文网/ 问答频道 /正文

伙计们,在heroku中部署我的django应用程序有一个问题 这是我的程序文件

web:gunicorn drf.wsgi:application --log-file -
web: python manage.py runserver 0.0.0.0:$PORT

在wsgi.py在

^{pr2}$

还添加了允许的主机

  ALLOWED_HOSTS = ['mxiondrf.herokuapp.com']

这是我的日志

18-07-23T23:34:50.814903+00:00 heroku[router]: at=info method=GET path="/" host=mxiondrf.herokuapp.com request_id=f4f07d1
b-be4a-4f62-85e0-6701c420da1c fwd="103.49.121.34" dyno=web.1 connect=0ms service=93ms status=400 bytes=154 protocol=https
2018-07-23T23:34:51.408577+00:00 app[web.1]: [23/Jul/2018 23:34:51] "GET /favicon.ico HTTP/1.1" 400 26
2018-07-23T23:34:51.410953+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mxiondrf.herokuapp.com request
_id=951b1ad8-0716-43c0-b21e-a8390ff59e63 fwd="103.49.121.34" dyno=web.1 connect=0ms service=79ms status=400 bytes=154 proto
col=https
2018-07-23T23:34:54.506740+00:00 heroku[router]: at=info method=GET path="/" host=mxiondrf.herokuapp.com request_id=581d35d
6-bdf3-49f9-9c4f-a74d6c39da08 fwd="103.49.121.34" dyno=web.1 connect=1ms service=60ms status=400 bytes=154 protocol=https
2018-07-23T23:34:54.506394+00:00 app[web.1]: [23/Jul/2018 23:34:54] "GET / HTTP/1.1" 400 26
2018-07-23T23:34:55.006560+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mxiondrf.herokuapp.com request
_id=c0c33673-f212-4679-ada8-7e7719e283eb fwd="103.49.121.34" dyno=web.1 connect=0ms service=124ms status=400 bytes=154 prot
ocol=https
2018-07-23T23:34:55.004234+00:00 app[web.1]: [23/Jul/2018 23:34:55] "GET /favicon.ico HTTP/1.1" 400 26

感谢任何帮助


Tags: pathinfocomidhostgetherokurequest