django 代码 400,消息错误请求版本 ('î\x9el\x00$\x13\x01\x13\x03\x13\x02À+À/̨̩À,À0À')

问题描述

我试图实现“使用 OTP 保护 Django 管理员登录”,但是我现在无法登录管理面板。我从任何地方删除了该应用程序,但仍然无法正常工作。有什么解决办法吗?

[05/Feb/2021 21:39:49] code 400,message Bad request version ('î\x9el\x00$\x13\x01\x13\x03\x13\x02À+À/̨̩À,À0À')
[05/Feb/2021 21:39:49] You're accessing the development server over HTTPS,but it only supports HTTP.

解决方法

如果您使用的是开发版本,则无法在本地主机上使用 https 连接,因此只需将您的 URL 设为 http,错误就会消失。 例如:

https://localhost:8000

https://127.0.0.1:8000

把它转成

http:localhost:8000

http://127.0.0.1:8000

也可能在127.0.0.1:8000