首页 > 博客相关『Blogger/WordPress』 > Apache2 Django {“detail”:”Authentication credentials were not provided.”}

Apache2 Django {“detail”:”Authentication credentials were not provided.”}

QQ图片20160519115351

其实项目已经是很久之前就完成了,部署到服务器上去之后后续的工作由于懒散一致没做,近几天开始进行重新继续项目之后发现一个很蛋疼的问题,在iOS端提交数据的时候提示:

{“detail”:”Authentication credentials were not provided.”},搜索之后发现原来是mod_wsgi转发数据的时候将authorization header 去掉了,所以会导致认证失败。可以参考链接:

http://stackoverflow.com/questions/26906630/django-rest-framework-authentication-credentials-were-not-provided

修复也很简单,修改/etc/apache2/apache2.conf文件添加如下一行即可:

WSGIPassAuthorization On

原创文章,转载请注明: 转载自 火星信息安全研究院

本文标题: 《Apache2 Django {“detail”:”Authentication credentials were not provided.”}》

本文链接地址: http://h4ck.org.cn/2016/05/apache2-django-detailauthentication-credentials-were-not-provided/

  1. 还没有评论
评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks