How can I get all the request headers in Django?

前端 未结 9 2544
误落风尘
误落风尘 2020-11-29 20:57

I need to get all the Django request headers. From what i\'ve read, Django simply dumps everything into the request.META variable along with a lot aof other dat

9条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 21:09

    For what it's worth, it appears your intent is to use the incoming HTTP request to form another HTTP request. Sort of like a gateway. There is an excellent module django-revproxy that accomplishes exactly this.

    The source is a pretty good reference on how to accomplish what you are trying to do.

提交回复
热议问题