How to disable Django's invalid HTTP_HOST error?

前端 未结 11 947
日久生厌
日久生厌 2020-12-04 10:12

Ever since I deployed a site running Django 1.7 alpha (checked out from Git), I\'ve been occasionally receiving error messages with titles like:

\"Inv

11条回答
  •  孤街浪徒
    2020-12-04 10:49

    I can't comment yet, but since Order Deny, Allow is deprecated, the way to do this in a virtual host with the current Require directive is:

    
        SetEnvIfNoCase Host example\.com VALID_HOST
        Require env VALID_HOST
        Options
    
    

提交回复
热议问题