如何为Django启用WSGIPassAuthorization? [英] How to enable WSGIPassAuthorization for Django?
本文介绍了如何为Django启用WSGIPassAuthorization?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在测试Django API端点,但是我需要启用WSGIPassAuthorization以便接收Authorization标头.我应该在哪里启用它?
I am testing my Django API endpoints but I need to enable WSGIPassAuthorization to let Authorization header be received. Where should I enable it?
PS:我在macOS上,但是任何答案都可能有用!
PS: I am on macOS, but any answer might be useful!
推荐答案
如果使用的是mod_wsgi
,只需安装apache并将其在VirtualHost中使用.
If you are using mod_wsgi
, just install apache and use it inside your VirtualHost.
然后:WSGIPassAuthorization On
这篇关于如何为Django启用WSGIPassAuthorization?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文