Django returning HTTP 301?

前端 未结 3 779
礼貌的吻别
礼貌的吻别 2020-12-04 21:14

I have a django view that returns HTTP 301 on a curl request:

grapefruit:~ pete$ curl -I http://someurl
HTTP/1.1 301 MOVED PERMANENTLY
Date: Fri, 16 Oct 2009         


        
3条回答
  •  天涯浪人
    2020-12-04 21:51

    In my case, commenting the SecurityMiddleware on the settings.py file did the trick. I have to say that this only happens when running the runserver command (aka. when testing). With Apache it doesn't falls into the redirect loop.

提交回复
热议问题