Django: Rest Framework authenticate header

前端 未结 5 1576
小鲜肉
小鲜肉 2020-12-23 02:36

Using Django REST API, I\'m trying to authenticate my request.

This is what I\'m trying to send:

Content-Type: application/json, Authentication: toke         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-23 03:05

    Just in case anyone else comes across this error. This can also happen if you are running Django on Apache using mod_wsgi because the authorization header is stripped out by mod_wsgi. You'll need to add the following to your VirtualHost configuration:

    WSGIPassAuthorization On

提交回复
热议问题