dan*_*ast 13 python django https redirect http
我在跑步:
python manage.py runserver localhost:44100
Run Code Online (Sandbox Code Playgroud)
这会将我重定向到https:
» http http://localhost:44100/
HTTP/1.0 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Date: Mon, 05 Mar 2018 14:09:09 GMT
Location: https://localhost:44100/
Server: WSGIServer/0.1 Python/2.7.14
X-Frame-Options: SAMEORIGIN
Run Code Online (Sandbox Code Playgroud)
为什么/如何发生这种情况?什么设置控制是否Django接受http/ https?
Sar*_*ngh 14
我最好的猜测是你已经设置的项目的settings.py文件
SECURE_SSL_REDIRECT = True
Run Code Online (Sandbox Code Playgroud)
这会导致您的http重定向到https.你可以在这里阅读它.
如果是这种情况,您可能希望删除该行并清除浏览器缓存,然后才能按预期工作.
希望有所帮助.
| 归档时间: |
|
| 查看次数: |
10478 次 |
| 最近记录: |